Skip to content

Commit

Permalink
Merge pull request #173 from ClickHouse/fix/compress-remove-write-blo…
Browse files Browse the repository at this point in the history
…ck-check

fix(compress): remove writer check for block size
  • Loading branch information
ernado authored Aug 15, 2022
2 parents dc29edc + 637a30f commit cb3fa40
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions compress/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ type Writer struct {

// Compress buf into Data.
func (w *Writer) Compress(m Method, buf []byte) error {
if len(buf) > maxBlockSize {
return errors.Errorf("buf size %d > %d max size", len(buf), maxBlockSize)
}

maxSize := lz4.CompressBlockBound(len(buf))
w.Data = append(w.Data[:0], make([]byte, maxSize+headerSize)...)
_ = w.Data[:headerSize]
Expand Down

0 comments on commit cb3fa40

Please sign in to comment.