Created
August 1, 2011 14:03
-
-
Save rtyley/1118177 to your computer and use it in GitHub Desktop.
Git loose objects - Experimental format header vs Gzip header checksum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 0ttt1000 | |
// 0iii1000 | |
def monkey(t: Int, w: Int) = (t<<12) + (8<<8) + (w << 4) + (8) | |
for (t <- 1 to 4; windowBit <- 0 to 7) { | |
val header = monkey(t,windowBit) | |
println(t, windowBit, header, "%04X" format header, header % 31 == 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment