Parcourir la source

Remove the no-longer-used maxOffset constant.

It was no longer used as of commit 8939696c "Use the same encoding
algorithm as C++ snappy".
Nigel Tao il y a 9 ans
Parent
commit
774a97396f
1 fichiers modifiés avec 0 ajouts et 4 suppressions
  1. 0 4
      encode.go

+ 0 - 4
encode.go

@@ -10,10 +10,6 @@ import (
 	"io"
 )
 
-// maxOffset limits how far copy back-references can go, the same as the C++
-// code.
-const maxOffset = 1 << 15
-
 func load32(b []byte, i int) uint32 {
 	b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line.
 	return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24