Skip to content

Commit

Permalink
updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zemariamm authored and jprobinson committed Feb 21, 2018
1 parent a4fca32 commit 2600fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
// The examples seem to indicate that it is.
DefaultQValue = 1.0

// For starters, if you’re compressing files that are smaller than the MTU size of a TCP packet, you’re wasting your time. 1500 bytes is the MTU size for the internet since that is the largest size allowed at the network layer.
// 1500 bytes is the MTU size for the internet since that is the largest size allowed at the network layer.
// If you take a file that is 1300 bytes and compress it to 800 bytes, it’s still transmitted in that same 1500 byte packet regardless, so you’ve gained nothing.
// That being the case, you should restrict the gzip compression to files with a size greater than a single packet, 1400 bytes (1.4KB) is a safe value.
DefaultMinSize = 1400
Expand Down

0 comments on commit 2600fb1

Please sign in to comment.