ArticleslgStudy

computer science

WavPack

WavPack is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand WavPack rather than just read about it. In short: WavPack is a free and open-source lossless audio compression format and application implementing the format. It is unique in the way that it supports hybrid audio compression alongside normal compression which is similar to how FLAC works.

WavPack — main illustration
WavPack — illustration

Key takeaways

  • WavPack belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect WavPack to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of WavPack from memory before moving on to harder problems.

Reference excerpt

WavPack is a free and open-source lossless audio compression format and application implementing the format. It is unique in the way that it supports hybrid audio compression alongside normal compression which is similar to how FLAC works. It also supports compressing a wide variety of lossless formats, including various variants of PCM and also DSD as used in SACDs, together with its support for surround audio.

Features WavPack compression can compress (and losslessly restore) 8, 16, 24, and 32-bit fixed-point, and 32-bit floating-point PCM audio files in the .WAV file format. It can also handle DSD input in DSDIFF or DSF format. It also supports surround sound streams and high sampling rates. Like other lossless compression schemes, the data reduction rate varies with the source, but it is generally between 30% and 70% for typical popular music and somewhat better than that for classical music and other sources with greater dynamic range.

Hybrid mode WavPack also incorporates a "hybrid" mode, which still provides the features of lossless compression, but creates two files: a relatively small, high-quality, lossy file (.wv) that can be used by itself; and a "correction" file (.wvc) that, when combined with the lossy file, provides full lossless restoration. This allows the use of lossy and lossless codecs together. The lossy algorithm is similar to ADPCM. Hybrid mode can handle floating-point data, but only when "exception" values like infinities or NaNs are not present. It cannot handle DSD because there is no lossy algorithm for DSD. A similar "hybrid" feature is also offered by OptimFROG DualStream, MPEG-4 SLS and DTS-HD Master Audio.

Summary Open-source, released under a BSD-like license Multiplatform Error robustness Fast encoding Higher compression ratios than other widely used (FLAC/ALAC) open-source lossless audio codecs Streaming support Supports multichannel audio and high resolutions Native support in WavPack 5.x for compressing Direct Stream Digital without converting the source file to PCM. Hybrid/lossy mode Hardware support (provided by Rockbox firmware) Metadata support (ID3, APE tags; APE tag is the preferred format) Supports RIFF chunks Compatible with ReplayGain Ability to create self-extracting files for the Win32 platform Supports 32-bit floating-point streams Supports embedded CUE sheets Includes MD5 hashes for quick integrity checking Can encode in both symmetrical and asymmetrical (slower encoding to speed up decoding) modes

History David Bryant started development on WavPack in mid-1998 with the release of version 1.0 (1998-08-15). This first version compressed and decompressed audio losslessly, and it already featured one of the best efficiency vs. speed ratios among lossless encoders. Very soon after the release of version 1.0, v. 2.0 (2 September 1998) was released, featuring lossy encoding (using only quantization of prediction residue for data reduction – no psychoacoustic masking model was applied to the stream). In 1999, version 3.0 (12 September 1999) was released, with a new "fast mode" (albeit with reduced compression ratio), compression of raw (headerless) PCM audio files, and error detection using a 32-bit cyclic redundancy check. A feature added in late 3.x versions is the "hybrid" mode where the encoder generates a lossy file and a correction file such that both can be decompressed back to a PCM stream that has same quality as the original. In WavPack 4, a new file format structure is introduced. A "roadmap" is also published by the author with 4.40, containing possible hints on future development. WavPack 5 introduced support for compressing DSD.

Support

Software Some software supports the format natively (like DeaDBeeF, foobar2000, and Jack! The Knife), while others require plugins. The official WavPack website offers plugins for Winamp, Nero Burning ROM, MediaChest 2.1, and several other applications, as well as a DirectShow filter. dBpoweramp CD-Ripper, by the author of foobar2000, as well as foobar2000 itself, and Asunder allow ripping Audio CDs directly into Wavpack files. Linux support is available with a native port. FFmpeg has a native WavPack encoder, which may be combined with software like GNU parallel to use multiple CPU cores to quickly transcode other lossless formats into WavPack, and from WavPack to any format that FFmpeg supports, without the need for additional software. However, FFMpeg's encoder is somewhat limited. As of 2023, FFmpeg's WavPack encoder has some considerable limitations. It can only produce version 4 bitstreams, which do not support fast verification for file integrity checks, or more than 16 channels. It will also discard RIFF chunks and may not behave predictably with 24-bit input. It also defaults to less than optimal compression to achieve faster encoding. Due to lack of support for Hybrid mode, FFmpeg-based playback software will fail to consider the .wvc correction file if there is one present, and will play or transcode only the lossy section. (However, this is not the usual mode of operation for WavPack.) As native Wavpack support for Direct Stream Digital was added in version 5 of the reference encoder, FFmpeg WavPack also is limited to encoding PCM input.

Hardware Native support:

Cowon A3 PMP supports WavPack out of the box. Non-native support:

Apple iPod range of music players do not support WavPack out of the box, but can through open-source Rockbox firmware. iRiver H100 series, through open-source Rockbox firmware. iRiver H300 series, through open-source Rockbox firmware. Android smartphones and tablets with the installation of third-party media-player software. ChromeOS devices using media-player software installed in the Linux subsystem or the Android Play Store. The WavPack website also includes a plugin that allows support for the format on the Roku PhotoBridge HD Archived 2005-07-08 at the Wayback Machine.

… excerpt ends here. Continue reading the full article.

Illustrations

WavPack illustration
WavPack illustration

Worked examples

Example 1 — a first encounter with WavPack

Start with the simplest possible case. Write down what WavPack claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to WavPack before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about WavPack ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of WavPack

In research
WavPack appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses WavPack in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
WavPack is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer file formats, Free audio codecs, Free audio software, so understanding it makes those chapters shorter.
In everyday life
Look for WavPack outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “WavPack” →

How to study WavPack in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what WavPack means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain WavPack out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is WavPack in simple terms?

WavPack is a free and open-source lossless audio compression format and application implementing the format. It is unique in the way that it supports hybrid audio compression alongside normal compression which is similar to how FLAC works.

Why does WavPack matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study WavPack?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on WavPack.

Tags

  • Computer file formats
  • Free audio codecs
  • Free audio software
  • Lossless audio codecs
  • Open formats
  • Software using the BSD license

Keep exploring