This discussion is archived
4 Replies Latest reply: Feb 26, 2007 12:38 PM by 791266 RSS

Tips for shaving a few bytes off a byte array?

807606 Newbie
Currently Being Moderated
Hi, before you give me the standard solution using Inflator and Deflator, Im doing this on a J2ME device (of which there is no solution already implemented for both compression and decompression).
I have a few byte arrays of length 150-300 bytes and just want to squeeze things all tighter if possible. The header information for decoding them should be stored in the resulting byte[] array also.

I know storing a huffman tree would probably be too large for this so I just want suggestions for any tiny things that can be done (ie looking for repetitions of bytes or nibbles in the array)

Thanks in advance!