On Wednesday, May 10, 2017 at 11:43:00 AM UTC-4, Aarón CdC wrote: > > I successfully managed to run a program that compresses and decompresses > files using the examples in the wiki. But after looking more in depth to > the examples, I noticed I still don't know how to get access to the > internal buffer where the data is being stored. ... >
You can't directly access the internal data once it enters the pipeline. The compression method I'm using pipes the data directly to a FileSink, and > it works (the decompression method also works if I do that), but when I try > to get the uncompressed data in memory trough an ArraySink and then pass it > trough a file stream, it seems to fail at some point. I have to be able to > handle the processed data after pumping and processing it, and before > placing it into a file, rather than passing it directly to a file. > I think you want either a custom Filter or a ChannelSwitch. A custom filter will allow you to perform additional processing or transformations, just like a HexDecoder or StreamTransformationFilter. Also see https://www.cryptopp.com/wiki/Filter. A ChannelSwitch is like the Unix tee command. It splits the output stream into two streams. Also see https://www.cryptopp.com/wiki/ChannelSwitch. Its also worth mentioning... If you want to have two logical chains instead of one big one, then use a ByteQueue rather than an Array. We provided an example of using ByteQues recently on Stack Overflow at http://stackoverflow.com/a/42820221/608639. But I recommend the custom Filter or ChannelSwitch before using two different chains glued together. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.