@@ -362,7 +362,7 @@ void BrotliDefaultFreeFunc(void* opaque, void* address) {
362
362
363
363
/***********************************************************************
364
364
**
365
- */ REBSER * CompressBrotli (REBSER * input , REBINT index , REBCNT in_len , REBINT level )
365
+ */ REBSER * CompressBrotli (REBSER * input , REBINT index , REBLEN in_len , REBINT level )
366
366
/*
367
367
** Compress a binary (only) using Brotli compression.
368
368
** data
@@ -390,7 +390,7 @@ void BrotliDefaultFreeFunc(void* opaque, void* address) {
390
390
}
391
391
392
392
availableOut = BrotliEncoderMaxCompressedSize (availableIn );
393
- output = Make_Binary (availableOut );
393
+ output = Make_Binary (( REBLEN ) availableOut );
394
394
395
395
inp = BIN_HEAD (input ) + index ;
396
396
out = BIN_HEAD (output );
@@ -406,7 +406,7 @@ void BrotliDefaultFreeFunc(void* opaque, void* address) {
406
406
407
407
BrotliEncoderDestroyInstance (BrotliEncoder );
408
408
409
- SERIES_TAIL (output ) = totalOut ;
409
+ SERIES_TAIL (output ) = ( REBLEN ) totalOut ;
410
410
if (SERIES_AVAIL (output ) > (1 <<14 )) // Is there wasted space?
411
411
output = Copy_Series (output ); // Trim it down if too big. !!! Revisit this based on mem alloc alg.
412
412
return output ;
@@ -461,9 +461,9 @@ static BrotliDecoderState *BrotliDecoder = NULL;
461
461
462
462
// If the output buffer is full, resize it
463
463
if (availableOut == 0 && (limit == 0 || limit < totalOut )) {
464
- SERIES_TAIL (output ) = totalOut ;
464
+ SERIES_TAIL (output ) = ( REBLEN ) totalOut ;
465
465
Expand_Series (output , AT_TAIL , out_len ); //@@ May throw an error and so the decoder would not be released!
466
- SERIES_TAIL (output ) = totalOut ;
466
+ SERIES_TAIL (output ) = ( REBLEN ) totalOut ;
467
467
nextOut = BIN_HEAD (output ) + totalOut ; // Move the output pointer to the correct position
468
468
availableOut = SERIES_AVAIL (output );
469
469
}
@@ -475,7 +475,7 @@ static BrotliDecoderState *BrotliDecoder = NULL;
475
475
if (limit > 0 && totalOut > limit ) totalOut = limit ;
476
476
477
477
SET_STR_END (output , totalOut );
478
- SERIES_TAIL (output ) = totalOut ;
478
+ SERIES_TAIL (output ) = ( REBLEN ) totalOut ;
479
479
return output ;
480
480
481
481
error :
0 commit comments