My server is sending a lot of duplicate strings, packed with gzip. Can I get that all the duplicates will be compressed to one instance?
Thank in advice!
My server is sending a lot of duplicate strings, packed with gzip. Can I get that all the duplicates will be compressed to one instance?
Thank in advice!
Sure. Just write some code on the server to do it.
You need to use some semi-permanent storage on the server to map duplicates. APC would probably do the job. Do something like this:
Generate a hash of your strings and then use that as the storage key, if the entry already exists, then there's your duplicate. So you can simply increase the entry count and then send that count along with a copy of the string.
If indeed this is the question you are asking in the first place...