Is there some library or built-in funcionality in J2ME to compress a byte array trough ZIP?
I'd like to do something like this:
byte[] data; byte[] compressed = ZIPLibrary.compress(data);
Thanks.
Is there some library or built-in funcionality in J2ME to compress a byte array trough ZIP?
I'd like to do something like this:
byte[] data; byte[] compressed = ZIPLibrary.compress(data);
Thanks.
Zip is an archive format as well as a compressor, meaning that it takes sets of files as input rather than a byte string. Use has the Deflater class instead; it implements the "deflate" algorithm that (I believe) is also used in Zip. Decompression can be done using Inflater.