We send network data in gzip format (Note: NOT zlib format, though we probably should. gzip is similar to zlib format but the headers work differently).
If you gzip a file 'x', and then gzip a file, 'y', and then concatenate the two gzipped files together, and then gunzip the resulting file, its contents will be equal to the files 'x' and 'y' concatenated together. The same can be found with Wesnoth saves: get two of them produced by Wesnoth that are compressed, concatenate them together, then gunzip them, and you will find the result is the same as the two uncompressed equivalents concatenated. However, the routines we use within Wesnoth to uncompress do not seem to work like this. If you compress two buffers, concatenate, and then decompress, you'll only get the first buffer back. Does anyone have any idea why this is? It is most unfortunate, because I could make the server's handling of game history substantially more efficient if our compression code worked the same way gzip does. David _______________________________________________ Wesnoth-dev mailing list [email protected] https://mail.gna.org/listinfo/wesnoth-dev
