Most reads now go through buffer for zlib.

This commit is contained in:
Jeroen van Rijn
2021-06-23 16:32:48 +02:00
parent 5cb16c4cd1
commit a70635d2f6
2 changed files with 66 additions and 15 deletions
+4
View File
@@ -645,6 +645,8 @@ inflate_from_byte_array :: proc(input: []u8, buf: ^bytes.Buffer, raw := false) -
bytes.reader_init(&r, input);
rs := bytes.reader_to_stream(&r);
ctx.input = rs;
ctx.input_data = input;
ctx.input_fully_in_memory = true;
buf := buf;
ws := bytes.buffer_to_stream(buf);
@@ -662,6 +664,8 @@ inflate_from_byte_array_raw :: proc(input: []u8, buf: ^bytes.Buffer, cb: ^Code_B
bytes.reader_init(&r, input);
rs := bytes.reader_to_stream(&r);
ctx.input = rs;
ctx.input_data = input;
ctx.input_fully_in_memory = true;
buf := buf;
ws := bytes.buffer_to_stream(buf);