Commit c8302882 authored by obscuren's avatar obscuren

method change

parent d87aa248
...@@ -45,7 +45,7 @@ func Decompress(dat []byte) ([]byte, error) { ...@@ -45,7 +45,7 @@ func Decompress(dat []byte) ([]byte, error) {
return buf.Bytes(), nil return buf.Bytes(), nil
} }
func compressBlock(dat []byte) (ret []byte, n int) { func compressChunk(dat []byte) (ret []byte, n int) {
switch { switch {
case dat[0] == token: case dat[0] == token:
return []byte{token, tokenToken}, 1 return []byte{token, tokenToken}, 1
...@@ -75,7 +75,7 @@ func Compress(dat []byte) []byte { ...@@ -75,7 +75,7 @@ func Compress(dat []byte) []byte {
i := 0 i := 0
for i < len(dat) { for i < len(dat) {
b, n := compressBlock(dat[i:]) b, n := compressChunk(dat[i:])
buf.Write(b) buf.Write(b)
i += n i += n
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment