Skip to content

Commit

Permalink
Remove commented old code
Browse files Browse the repository at this point in the history
  • Loading branch information
mchv committed Jan 8, 2024
1 parent 487a5d4 commit 094570a
Showing 1 changed file with 1 addition and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,52 +61,4 @@ class BrotliCompressor(level: Int = BrotliCompressor.DefaultQuality) extends Com
/** Make sure any resources have been released */
override final def close(): Unit = {}

}


/*
public BrotliOutputStream(OutputStream destination, Encoder.Parameters params)
*/



/*
public BrotliEncoderChannel(WritableByteChannel destination, Encoder.Parameters params)
throws IOException {
*/


/*
protected def flushWithBuffer(buffer: Array[Byte]): ByteString = {
val written = deflater.deflate(buffer, 0, buffer.length, Deflater.SYNC_FLUSH)
ByteString.fromArray(buffer, 0, written)
}
private def newTempBuffer(size: Int = 65536): Array[Byte] = {
// The default size is somewhat arbitrary, we'd like to guess a better value but Deflater/zlib
// is buffering in an unpredictable manner.
// `compress` will only return any data if the buffered compressed data has some size in
// the region of 10000-50000 bytes.
// `flush` and `finish` will return any size depending on the previous input.
// This value will hopefully provide a good compromise between memory churn and
// excessive fragmentation of ByteStrings.
// We also make sure that buffer size stays within a reasonable range, to avoid
// draining deflator with too small buffer.
new Array[Byte](math.max(size, MinBufferSize))
}
}
*/



}

0 comments on commit 094570a

Please sign in to comment.