Decompressing zlib file outputs empty string

I’m stuck on Stage #IC4.

I’ve tried decompressing a tree object type using zlib.
Here are my logs:

[tester::#KP1] Expected "dooby\nvanilla\nyikes\n" as stdout, got: ""
[tester::#KP1] Test failed

And here’s a snippet of my code:

let file_path = format!(
            first_two_letters, whats_left_from_file_name
        let data = fs::read(file_path).unwrap();

        let mut d = ZlibDecoder::new(data.as_slice());
        let mut result = String::new();
        d.read_to_string(&mut result);

@SomeoneWhoCodesForReal could you post your full code on GitHub please? A bit hard to tell what’s happening here without seeing the rest of the code…

Marking as closed for now, please let us know if you still need help!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.