Fix Microsoft VisualStudio 64-bit build of brotli
This commit is contained in:
+2
-2
@@ -651,9 +651,9 @@ int BrotliDecompress(BrotliInput input, BrotliOutput output) {
|
|||||||
|
|
||||||
// Decode window size.
|
// Decode window size.
|
||||||
window_bits = DecodeWindowBits(&br);
|
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_mask = ringbuffer_size - 1;
|
||||||
ringbuffer = (uint8_t*)malloc(ringbuffer_size +
|
ringbuffer = (uint8_t*)malloc(ringbuffer_size +
|
||||||
kRingBufferWriteAheadSlack +
|
kRingBufferWriteAheadSlack +
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ int BrotliMemInputFunction(void* data, uint8_t* buf, size_t count) {
|
|||||||
}
|
}
|
||||||
memcpy(buf, input->buffer + input->pos, count);
|
memcpy(buf, input->buffer + input->pos, count);
|
||||||
input->pos += count;
|
input->pos += count;
|
||||||
return count;
|
return (int)count;
|
||||||
}
|
}
|
||||||
|
|
||||||
BrotliInput BrotliInitMemInput(const uint8_t* buffer, size_t length,
|
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);
|
memcpy(output->buffer + output->pos, buf, count);
|
||||||
output->pos += count;
|
output->pos += count;
|
||||||
return count;
|
return (int)count;
|
||||||
}
|
}
|
||||||
|
|
||||||
BrotliOutput BrotliInitMemOutput(uint8_t* buffer, size_t length,
|
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) {
|
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) {
|
BrotliOutput BrotliFileOutput(FILE* f) {
|
||||||
|
|||||||
Reference in New Issue
Block a user