mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Fix Microsoft VisualStudio 64-bit build of brotli
This commit is contained in:
parent
354349d7ae
commit
29bb7cb1af
@ -651,9 +651,9 @@ int BrotliDecompress(BrotliInput input, BrotliOutput output) {
|
||||
|
||||
// Decode window size.
|
||||
window_bits = DecodeWindowBits(&br);
|
||||
max_backward_distance = (1 << window_bits) - 16;
|
||||
max_backward_distance = (1ULL << window_bits) - 16;
|
||||
|
||||
ringbuffer_size = 1 << window_bits;
|
||||
ringbuffer_size = 1ULL << window_bits;
|
||||
ringbuffer_mask = ringbuffer_size - 1;
|
||||
ringbuffer = (uint8_t*)malloc(ringbuffer_size +
|
||||
kRingBufferWriteAheadSlack +
|
||||
|
@ -34,7 +34,7 @@ int BrotliMemInputFunction(void* data, uint8_t* buf, size_t count) {
|
||||
}
|
||||
memcpy(buf, input->buffer + input->pos, count);
|
||||
input->pos += count;
|
||||
return count;
|
||||
return (int)count;
|
||||
}
|
||||
|
||||
BrotliInput BrotliInitMemInput(const uint8_t* buffer, size_t length,
|
||||
@ -55,7 +55,7 @@ int BrotliMemOutputFunction(void* data, const uint8_t* buf, size_t count) {
|
||||
}
|
||||
memcpy(output->buffer + output->pos, buf, count);
|
||||
output->pos += count;
|
||||
return count;
|
||||
return (int)count;
|
||||
}
|
||||
|
||||
BrotliOutput BrotliInitMemOutput(uint8_t* buffer, size_t length,
|
||||
@ -100,7 +100,7 @@ BrotliOutput BrotliStdoutOutput() {
|
||||
}
|
||||
|
||||
int BrotliFileOutputFunction(void* data, const uint8_t* buf, size_t count) {
|
||||
return fwrite(buf, 1, count, (FILE*)data);
|
||||
return (int)fwrite(buf, 1, count, (FILE*)data);
|
||||
}
|
||||
|
||||
BrotliOutput BrotliFileOutput(FILE* f) {
|
||||
|
Loading…
Reference in New Issue
Block a user