Closed Phill030 closed 1 year ago
The problem is that buffer2
has no capacity. Even though decompress_vec
will manage the output buffer's length, it will not grow it.
This playground shows how to do it, and validates that it writes 33 bytes into the output buffer.
Note that decompressing like this may end up with the input not being fully consumed as the output vector isn't big enough. It's probably easier to use types from the read
module instead.
I'm trying to decompress a vec which works in C# as well as in TypeScript, but in Rust it doesn't want to work and I don't know why
value of tmp_read is
[120, 218, 251, 255, 207, 144, 193, 138, 193, 151, 161, 146, 33, 143, 33, 149, 161, 156, 161, 24, 72, 38, 51, 148, 48, 100, 50, 228, 3, 69, 120, 25, 184, 24]
prints: