WavPack files from before version 4.0 have a different header and no sub-blocks. These are the definitions the reference library keeps for reading them. Its legacy reader was not available to check, so how the header sits in the file, including any RIFF wrapper, and the exact layouts of versions before 3 could not be confirmed.
Version 3 header
| Offset | Size | Type | Field | Notes |
|---|---|---|---|---|
| 0 | 4 | char[4] | ckID | |
| 4 | 4 | int32 | ckSize | |
| 8 | 2 | int16 | version | |
| 10 | 2 | int16 | bits | Added in version 2.00 |
| 12 | 2 | int16 | flags | Added in version 3.00 |
| 14 | 2 | int16 | shift | Added in version 3.00 |
| 16 | 4 | int32 | total_samples | |
| 20 | 4 | uint32 | crc | |
| 24 | 4 | uint32 | crc2 | |
| 28 | 4 | char[4] | extension | |
| 32 | 1 | char | extra_bc | |
| 33 | 3 | char[3] | extras |
Flags
| Mask | Name | Meaning |
|---|---|---|
0x0001 | MONO_FLAG | Not stereo |
0x0002 | FAST_FLAG | Non-adaptive predictor and stereo mode |
0x0004 | RAW_FLAG | Raw mode, with no .wav header |
0x0008 | CALC_NOISE | Calculate noise in lossy mode (not stored) |
0x0010 | HIGH_FLAG | High quality mode, in all modes |
0x0020 | BYTES_3 | Files have 3-byte samples |
0x0040 | OVER_20 | Samples of more than 20 bits |
0x0080 | WVC_FLAG | Create or use a .wvc file (not stored) |
0x0100 | LOSSY_SHAPE | Noise shaping, lossy only |
0x0200 | VERY_FAST_FLAG | Double fast (not stored) |
0x0400 | NEW_HIGH_FLAG | New high quality mode, lossless only |
0x0800 | CANCEL_EXTREME | Cancels EXTREME_DECORR |
0x1000 | CROSS_DECORR | Decorrelate channels, with EXTREME_DECORR |
0x2000 | NEW_DECORR_FLAG | New decorrelator for high mode |
0x4000 | JOINT_STEREO | Joint stereo, lossy and high lossless |
0x8000 | EXTREME_DECORR | Extra decorrelation, which enables other flags |
The flags that affect unpacking, STORED_FLAGS, are 0xFD77.
Some of these names were reused with new meanings in WavPack 4.0. The flags on the block header page are the current ones.