#ifndef FLAC__PRIVATE__BITREADER_H
#define FLAC__PRIVATE__BITREADER_H
#include <stdio.h>
#include "FLAC/ordinals.h"
#include "cpu.h"
struct FLAC__BitReader;
FLAC__BitReader;
FLAC__BitReaderReadCallback;
FLAC__BitReader *FLAC__bitreader_new(void);
void FLAC__bitreader_delete(FLAC__BitReader *br);
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback rcb, void *cd);
void FLAC__bitreader_free(FLAC__BitReader *br);
FLAC__bool FLAC__bitreader_clear(FLAC__BitReader *br);
void FLAC__bitreader_set_framesync_location(FLAC__BitReader* br);
FLAC__bool FLAC__bitreader_rewind_to_after_last_seen_framesync(
FLAC__BitReader* br);
void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out);
void FLAC__bitreader_reset_read_crc16(FLAC__BitReader *br, FLAC__uint16 seed);
FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br);
FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br);
uint32_t FLAC__bitreader_bits_left_for_byte_alignment(
const FLAC__BitReader* br);
uint32_t FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader* br);
void FLAC__bitreader_set_limit(FLAC__BitReader* br, uint32_t limit);
void FLAC__bitreader_remove_limit(FLAC__BitReader* br);
uint32_t FLAC__bitreader_limit_remaining(FLAC__BitReader* br);
void FLAC__bitreader_limit_invalidate(FLAC__BitReader* br);
FLAC__bool FLAC__bitreader_read_raw_uint32(FLAC__BitReader* br,
FLAC__uint32* val,
uint32_t bits);
FLAC__bool FLAC__bitreader_read_raw_int32(FLAC__BitReader* br,
FLAC__int32* val,
uint32_t bits);
FLAC__bool FLAC__bitreader_read_raw_uint64(FLAC__BitReader* br,
FLAC__uint64* val,
uint32_t bits);
FLAC__bool FLAC__bitreader_read_raw_int64(FLAC__BitReader* br,
FLAC__int64* val,
uint32_t bits);
FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__uint32 *val);
FLAC__bool FLAC__bitreader_skip_bits_no_crc(FLAC__BitReader* br, uint32_t bits);
FLAC__bool FLAC__bitreader_skip_byte_block_aligned_no_crc(
FLAC__BitReader* br,
uint32_t nvals);
FLAC__bool FLAC__bitreader_read_byte_block_aligned_no_crc(
FLAC__BitReader* br,
FLAC__byte* val,
uint32_t nvals);
FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader* br,
uint32_t* val);
FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader* br,
int* val,
uint32_t parameter);
FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader* br,
int vals[],
uint32_t nvals,
uint32_t parameter);
#if 0
FLAC__bool FLAC__bitreader_read_golomb_signed(FLAC__BitReader *br, int *val, uint32_t parameter);
FLAC__bool FLAC__bitreader_read_golomb_unsigned(FLAC__BitReader *br, uint32_t *val, uint32_t parameter);
#endif
FLAC__bool FLAC__bitreader_read_utf8_uint32(FLAC__BitReader* br,
FLAC__uint32* val,
FLAC__byte* raw,
uint32_t* rawlen);
FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader* br,
FLAC__uint64* val,
FLAC__byte* raw,
uint32_t* rawlen);
#endif