I'm writing a CL library to read MS Excel(tm) spreadsheets called "xlmanip" (not ready for prime time yet -- only reads "xlsx" spreadsheets, works for the 80% use case of "I want to operate on cell contents"... but I digress.)
One thing that worries me when reading "xlsx" (ZIP archives in XML format) is that the current ZIP handling library, Common Lisp ZIP, unpacks the compressed contents as a (vector (unsigned-byte 8))
. For a large spreadsheet, that'll cause an issue for the end user.
One alternative I've thought about is delayed loading -- let-over-lambda a closure that effectively demand-loads the worksheet when needed. However, that's just delaying the inevitable.
Are there any ZIP file CL libraries out there that return a Gray stream to a ZIP component's contents as opposed to a (potentially large) (vector (unsigned-byte 8))
?
Edit: Clarification
I'm looking for a ZIP component function that returns a stream, not one that takes a stream. The functions that take a stream write the ZIP component's contents directly to the file associated with the stream. I'd rather that xlmanip reads from a stream directly as if the ZIP component were (implicitly, virtually) a file.
Chipz can decompress a ZIP to a stream. It provides a decompress functions where you give it an output stream and a input stream to decompress and it returns the output stream where the decompressed contents can be read.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With