Skip to content

Conversation

@billallen256
Copy link
Contributor

The corrupt gzip file used in the tests prevents some systems from mirroring this crate because the system's antivirus software rejects corrupt files that it cannot scan.

@alexcrichton
Copy link
Member

Thanks!

@alexcrichton alexcrichton merged commit 33f9f3d into rust-lang:master Jul 12, 2021
jose-pr added a commit to jose-pr/flate2-rs that referenced this pull request Jul 29, 2021
Fixes what rust-lang#277 tried to fixed, changing the name alone wont fix the problem as the renamed file still contains the GZ magic number and will still be detected by a file scanner as a corrupt GZ file.
Used the following to generate the hex file.

```
fn bin_to_hex(bin_reader: impl Read, hex_writer: impl Write) {
    let bin_reader = BufReader::new( bin_reader);
    let mut hex_writer = BufWriter::new( hex_writer);

    for byte in bin_reader.bytes() {
        let byte = byte.unwrap();
        write!(hex_writer, "{:X} ", byte).unwrap();
    }

    hex_writer.flush().unwrap();
}
```
jose-pr added a commit to jose-pr/flate2-rs that referenced this pull request Jul 30, 2021
Fixes what rust-lang#277 tried to fixed, changing the name alone wont fix the problem as the renamed file still contains the GZ magic number and will still be detected by a file scanner as a corrupt GZ file.
Used the following to generate the hex file.

```
fn bin_to_hex(bin_reader: impl Read, hex_writer: impl Write) {
    let bin_reader = BufReader::new( bin_reader);
    let mut hex_writer = BufWriter::new( hex_writer);

    for byte in bin_reader.bytes() {
        let byte = byte.unwrap();
        write!(hex_writer, "{:X} ", byte).unwrap();
    }

    hex_writer.flush().unwrap();
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants