Skip to content

Commit 9463a11

Browse files
committed
Add comment about result of compressing
1 parent 19e32f4 commit 9463a11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stream.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ impl CompressStream {
8181
Some(input) => {
8282
let op = BrotliEncoderOperation::BROTLI_OPERATION_PROCESS;
8383
let mut available_in = input.len();
84+
// `BrotliEncoderCompressStream` does not return a `BrotliResult` but returns a boolean,
85+
// which is different from `BrotliDecompressStream`.
86+
// But the requirement for input/output buf is common so we reused `BrotliStreamResult` to report it.
8487
let ret = BrotliEncoderCompressStream(
8588
&mut self.state,
8689
op,

0 commit comments

Comments
 (0)