Is there a gzip compression library that will work on J2ME?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Another approach would be to find a J2SE implementation and try to convert it to J2ME. I wouldn't expect it to be hard, but still it would require some effort. How about this one (jazzlib?)?
Try Jazzlib, although it's GPL, and seems like it hasn't been updated for a while. Another option is to try and lift the source from libgcj (which is what jazzlib did).
J2SE includes
java.util.zip
which can compress/decompress gzip files, but the MIDP 2.0 specification does not include ajava.util.zip
. And looking at the Java 6 source code forjava.util.zip
, each class seems to call native methods, which means you can't just lift what's there and download it to a J2ME device.You may want to check out: http://code.google.com/p/compress-j2me/. Uses only 7k (~5k after obfuscation). Compression is under developement.
Have you tried this one? (I haven't, but found it when googling.)
Original jazzlib is for J2SE only.
Jazzlib ported to j2me is available here: http://code.google.com/p/staff/downloads/list?q=jazzlib
I've seen successful use of http://www.tinyline.com/utils/ which gives you a gzipinputstream useful for http communications.