Fix for a small problem in ov_read() which made the code rather unreadable, and was...
[platform/upstream/libvorbis.git] / lib / bitwise.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE.  *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5  * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE.    *
6  * PLEASE READ THESE TERMS DISTRIBUTING.                            *
7  *                                                                  *
8  * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
9  * by Monty <monty@xiph.org> and The XIPHOPHORUS Company            *
10  * http://www.xiph.org/                                             *
11  *                                                                  *
12  ********************************************************************
13
14   function: packing variable sized words into an octet stream
15   last mod: $Id: bitwise.h,v 1.5 2000/01/12 11:16:37 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _V_BITW_H_
20 #define _V_BITW_H_
21
22 #include "vorbis/codec.h"
23
24 extern void  _oggpack_writeinit(oggpack_buffer *b);
25 extern void  _oggpack_reset(oggpack_buffer *b);
26 extern void  _oggpack_writeclear(oggpack_buffer *b);
27 extern void  _oggpack_readinit(oggpack_buffer *b,char *buf,int bytes);
28 extern void  _oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
29 extern long  _oggpack_look(oggpack_buffer *b,int bits);
30 extern long  _oggpack_look1(oggpack_buffer *b);
31 extern void  _oggpack_adv(oggpack_buffer *b,int bits);
32 extern void  _oggpack_adv1(oggpack_buffer *b);
33 extern long  _oggpack_read(oggpack_buffer *b,int bits);
34 extern long  _oggpack_read1(oggpack_buffer *b);
35 extern long  _oggpack_bytes(oggpack_buffer *b);
36 extern long  _oggpack_bits(oggpack_buffer *b);
37 extern char *_oggpack_buffer(oggpack_buffer *b);
38
39 #endif