In the C API documentation (NSFNoteAttachfile), I found the following:…the Item APIs offer no means of dealing with signed, sealed, or compressed item values…
Is the compression format for Huffman or LZ1 documented anywhere? - I mean similar to how MS documents their LZX compression in their Microsoft Cabinet SDK
My company uses ZipMail if that helps you at all, might save you some work, it’s a 3rd party application and works pretty well from what I’ve seen so far.
There is also a technical white paper (which I didn’t download) about the comparison of ZipMail compression and Lotus’ LZ1 compression which is here:
signed & sealed is something you don’t have to care about, that’s handled automatically.
attachments are stored inside a database in an object, which is always contained by a note/document - here it’s refered to in $File item. $File contains also more information about size, object-id an compression used (if any).
without using functions to save attachment to disk you can only read object directly. but you’ll have to find out about how they use compression (header are for sure different). i’ve had a look once at LZ1 compression, beginning with notes5 there are undocumented functions for LZ1 compression/decompression that can be used for direct uncompression of attachments. but that’s maybe not the best way to go…
I can save the compressed items to disk using NSFDb…() functions, but havent really done much testing yet. Some info on the header structure (if any), max match length, sliding window length, etc. are kind of essential to be able to decompress them.
I have found a bunch of compress/decompress functions in one of the object files (including HuffDecode/LZ1Decompress, which sound really nice), but figuring out all the parameters will not be easy.
If anyone has either info on these functions or the attributes that matter for LZ1/Huffman decompression it would be appreciated.
Since monday I’ve been digging into the LZ1 compression and I’ve cracked most of it.
I’ve only tested it on a small number of compressed files, but now I can successfully decompress files where the last 2 header bytes = 0x0500 (WORD 5) without problems.
I’m stuck on files where it’s 0x0100 (WORD 1), as the file seems to be split up into multiple blocks. I haven’t seen other values than 1 and 5 yet.
Also - match_offset and match_length seem to become huuuuge. Does anyone know their max values?