A lossless audio compression scheme is adapted for use in a unified lossy
and lossless audio compression scheme. In the lossless compression, the
adaptation rate of an adaptive filter is varied based on transient
detection, such as increasing the adaptation rate where a transient is
detected. A multi-channel lossless compression uses an adaptive filter
that processes samples from multiple channels in predictive coding a
current sample in a current channel. The lossless compression also
encodes using an adaptive filter and Golomb coding with non-power of two
divisor.