I plan to use java.util.zip to compress http post data when sending it from a java client to the server(java servlet in this case).
is this the best approach for reducing data load?
should I use gzip as the compression alg?
I plan to use java.util.zip to compress http post data when sending it from
Share
Possibly, Tag based data can be compressed fairly easily using a simple algorithm.
For every unique tag or attribute name, assign ID, replace tags with ID, store ID and tag name in separate file, then compress to zip.
Then simply replace your tag ID’s with the tag names you get in the separate file after you decompress from zip.
(You don’t HAVE to use two files, you can do it in the same file)
You can also do this method for individual ‘Words’ inside of the tags or attributes.
This takes a bit more time than just zipping it, but for medium to large files with a lot of repeated text, it saves a decent amount of data to be transfered.
I am not aware of what is defined in ‘http post data’, but if its just tags, a similar algorithm might work.