CRAM is a file format created to handle compression of files containing both binary and audio data. It was developed specifically for the purpose of compressing instrument files (such as SoundFont, DLS, GigaSampler, etc) but is not confined to this purpose. Binary data is compressed using bzlib or zlib and the audio is compressed with WavPack or FLAC. By using an audio compressor to handle the audio, better compression ratios can be achieved than if one were to just use a regular binary compressor.
Format Features
- Can store multiple files with paths and date preservation
- 8/16/24/32 bit PCM mono and stereo audio support, 32 bit float support (WavPack? only)
- Hybrid lossy/lossless mode (WavPack? only) where a much smaller lossless .craml file can be stored with a .cramc correction file which when combined results in the original lossless audio. The combined size is not much greater than the equivalent .cram lossless file. This provides convenience for creating a preview instrument file.
- Format is not limited to 4GB (each file could be up to approx. 256 bytes, that is 72057594037927936!)
- Individual compressors for different formats, but decompressor is generic
- MD5 integrity checksum on binary and audio data
- Based on EBML for flexible backwards compatible expansion and compact variable length integers
Format Specification
The CRAM technical specification is available in several different formats:
- View the Cram Format Specification online in HTML.
- Download the Cram Specification PDF.
- Download the original Open Office document.
Reference Implementation
libInstPatch contains the current reference implementation of CRAM and supports SoundFont (including 24 bit), DLS and some GigaSampler files.
