The new method AddFile without a stream input argument returns a writeable stream, which is finalized into the archive when it is closed/disposed.
The new method Extract returns a readable stream with the contents from the archive.
The previous API methods are kept compatible externally, but wraps the new stream API .
The benefits from having an external stream is that the caller can use the stream in a pipeline fashion, i.e. stream serialized data directly into the archive, instead of creating a temporary stream and passing that to ZipStorer.
This is a deeper change than what I added for #10 .
The new method
AddFile
without a stream input argument returns a writeable stream, which is finalized into the archive when it is closed/disposed. The new methodExtract
returns a readable stream with the contents from the archive.The previous API methods are kept compatible externally, but wraps the new stream API .
The benefits from having an external stream is that the caller can use the stream in a pipeline fashion, i.e. stream serialized data directly into the archive, instead of creating a temporary stream and passing that to ZipStorer.
This is a deeper change than what I added for #10 .