Skip to content

Commit

Permalink
Merge pull request rust-lang#138 from est31/master
Browse files Browse the repository at this point in the history
Emit a RFC 1952 compatible XFL flag again
  • Loading branch information
alexcrichton authored Nov 30, 2017
2 parents 044ac12 + a336dae commit e5036e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gz/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,13 @@ impl GzBuilder {
header[5] = (mtime >> 8) as u8;
header[6] = (mtime >> 16) as u8;
header[7] = (mtime >> 24) as u8;
header[8] = lvl.0 as u8;
header[8] = if lvl.0 >= Compression::best().0 {
2
} else if lvl.0 <= Compression::fast().0 {
4
} else {
0
};

// Typically this byte indicates what OS the gz stream was created on,
// but in an effort to have cross-platform reproducible streams just
Expand Down

0 comments on commit e5036e6

Please sign in to comment.