[ogg-dev] Ogg bitwise.c bit tracking

Conrad Parker conrad at metadecks.org
Thu Feb 7 00:23:06 PST 2008

On 06/02/2008, ogg.k.ogg.k at googlemail.com <ogg.k.ogg.k at googlemail.com> wrote:
> Hi,
> it seems Ogg keeps track of a packet's size at the byte level, rather than
> at the bit level (eg, if I encode a packet with just one bit, decode will
> think there are 8 bits available). Am I right ?

Yes, you are right that Ogg packets are always a whole number of bytes
in length.

The bitpacking routines in libogg are completely separate from the
framing (the part which handles page and packet headers, and thus
packet lengths etc.) That bitpacker is only used by the Vorbis codec,
it's not really a part of Ogg encapsulation.



More information about the ogg-dev mailing list