Skip to content

Commit

Permalink
fix(adaptive): remove bufSize's limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
wqshr12345 committed Oct 30, 2023
1 parent 55d63f9 commit a30823b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adaptive/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
packageCompressTypeSize = 1
packageDataLenSize = 4

maxOriginalDataSize = 65536
// maxOriginalDataSize = 65536

// temoparily is not used, because there is no reusable oBuf in reader.
maxCompressedDataSize = 76490
Expand All @@ -65,9 +65,9 @@ type Writer struct {
}

func NewWriter(w io.Writer, bufSize int) *Writer {
if bufSize > maxOriginalDataSize {
panic("lands: the buffer is larger than the maximum of snappy's compression data.")
}
// if bufSize > maxOriginalDataSize {
// panic("lands: the buffer is larger than the maximum of snappy's compression data.")
// }
return &Writer{
outW: w,
cmpr: snappy.NewCompressor(),
Expand Down

0 comments on commit a30823b

Please sign in to comment.