Make internal decoder functions static

Affected functions: WriteRingBuffer, CopyUncompressedBlockToOutput,
                    BrotliAllocateRingBuffer
This commit is contained in:
Tim Rühsen 2015-10-26 21:20:22 +01:00
parent f769ba85bf
commit b9e413faa6

View File

@ -762,8 +762,8 @@ static void DecodeBlockTypeWithContext(BrotliState* s,
s->context_lookup2 = &kContextLookup[kContextLookupOffsets[context_mode + 1]]; s->context_lookup2 = &kContextLookup[kContextLookupOffsets[context_mode + 1]];
} }
BrotliResult WriteRingBuffer(BrotliOutput output, static BrotliResult WriteRingBuffer(BrotliOutput output,
BrotliState* s) { BrotliState* s) {
int num_written; int num_written;
if (s->meta_block_remaining_len < 0) { if (s->meta_block_remaining_len < 0) {
return BROTLI_FAILURE(); return BROTLI_FAILURE();
@ -784,9 +784,8 @@ BrotliResult WriteRingBuffer(BrotliOutput output,
return BROTLI_RESULT_SUCCESS; return BROTLI_RESULT_SUCCESS;
} }
BrotliResult BROTLI_NOINLINE CopyUncompressedBlockToOutput(BrotliOutput output, static BrotliResult BROTLI_NOINLINE CopyUncompressedBlockToOutput(
int pos, BrotliOutput output, int pos, BrotliState* s) {
BrotliState* s) {
BrotliResult result; BrotliResult result;
int num_read; int num_read;
int nbytes; int nbytes;
@ -918,8 +917,8 @@ int BrotliDecompressedSize(size_t encoded_size,
processed. When this method is called, metablock size and flags MUST be processed. When this method is called, metablock size and flags MUST be
decoded. decoded.
*/ */
int BROTLI_NOINLINE BrotliAllocateRingBuffer(BrotliState* s, static int BROTLI_NOINLINE BrotliAllocateRingBuffer(BrotliState* s,
BrotliBitReader* br) { BrotliBitReader* br) {
static const int kRingBufferWriteAheadSlack = BROTLI_READ_SIZE; static const int kRingBufferWriteAheadSlack = BROTLI_READ_SIZE;
int is_last = s->is_last_metablock; int is_last = s->is_last_metablock;
s->ringbuffer_size = 1 << s->window_bits; s->ringbuffer_size = 1 << s->window_bits;