Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed corrupt test gzip file #277

Merged
merged 2 commits into from
Jul 12, 2021
Merged

Renamed corrupt test gzip file #277

merged 2 commits into from
Jul 12, 2021

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