Again in April I shared go-cabinet right here, a pure Go library for studying and writing Microsoft Cupboard (.cab) information. LZX was the large lacking piece on the time, and v0.3.0 provides it for each studying and writing, so go-cabinet now covers None, MSZIP and LZX out of the field.
if err := w.SetCompression(cupboard.LZX); err != nil {
return err
}
The default is a 2 MiB window, and cupboard.LZXWindow(n) picks something from 2^15 to 2^21 bytes. LZX produces noticeably smaller cupboards than MSZIP however compresses extra slowly.
In case you’re upgrading from v0.2, there are just a few breaking adjustments:
- Customized codecs now implement the
EncoderandDecoderinterfaces as a substitute of wrappingio.Authorandio.Reader.mszip.NewWriterandmszip.NewReaderare changed bymszip.NewEncoderandmszip.NewDecoder. MSZipis nowMSZIP.SetCompressionrejects an invalid or unregistered methodology instantly as a substitute ofShutfailing later.
Full launch notes: Launch v0.3.0 · abemedia/go-cabinet · GitHub
As earlier than, I’d love to listen to from anybody utilizing it, and particularly about any cab information it might probably’t deal with.

