Fix Microsoft VisualStudio 64-bit build of brotli

This commit is contained in:
Zoltan Szabadka 2013-12-13 15:30:20 +01:00
parent 354349d7ae
commit 29bb7cb1af
2 changed files with 5 additions and 5 deletions

View File

@ -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 +

View File

@ -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) {