> An example: A 100 byte Put results in a 50 byte Get() on the source > side, the 50 bytes is sent over a TCP socket to the destination, but > only 30 bytes are read on the first socket receive on the > destination. The destination Put()s the 30 bytes into the > ZLibDecompressor, does a Flush(true), and tries a Get() of > MaxRetrievable() bytes.
No, if you try to do this, you will get an error if you do Flush(true) on the receiving side at 30 bytes. You can only call Flush(true) on the receiving side at the same point in the data stream that you called Flush(true) on the sending side. In order to ensure this, you should send the packet length (50 bytes in this case) explicitly. > Also, do the Crypto++ Zlib classes support custom dictionaries? I did > not see any mention of custom dictionaries in the API. The zlib > documentation calls this a Preset dictionary, controlled by the FDICT > (Preset dictionary) flag in the zlib stream. Crypto++ doesn't have support for preset dictionary at this point. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [EMAIL PROTECTED] More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~---
