Package com.linkedin.venice.compression
Class NoopCompressor
java.lang.Object
com.linkedin.venice.compression.VeniceCompressor
com.linkedin.venice.compression.NoopCompressor
- All Implemented Interfaces:
Closeable
,AutoCloseable
Locking is not necessary for
NoopCompressor
, so this class overrides all the public APIs to avoid locking.-
Field Summary
Fields inherited from class com.linkedin.venice.compression.VeniceCompressor
SCHEMA_HEADER_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
byte[]
compress
(byte[] data) compress
(ByteBuffer data, int startPositionOfOutput) protected byte[]
compressInternal
(byte[] data) protected ByteBuffer
compressInternal
(ByteBuffer src, int startPositionOfOutput) decompress
(byte[] data, int offset, int length) decompress
(InputStream inputStream) decompress
(ByteBuffer data) decompressAndPrependSchemaHeader
(byte[] data, int offset, int length, int schemaHeader) This method tries to decompress data and maybe prepend the schema header.protected ByteBuffer
decompressAndPrependSchemaHeaderInternal
(byte[] data, int offset, int length, int schemaHeader) protected ByteBuffer
decompressInternal
(byte[] data, int offset, int length) protected InputStream
decompressInternal
(InputStream inputStream) protected ByteBuffer
decompressInternal
(ByteBuffer data) boolean
int
hashCode()
Methods inherited from class com.linkedin.venice.compression.VeniceCompressor
getCompressionStrategy
-
Constructor Details
-
NoopCompressor
public NoopCompressor()
-
-
Method Details
-
compress
- Overrides:
compress
in classVeniceCompressor
- Throws:
IOException
-
compressInternal
- Specified by:
compressInternal
in classVeniceCompressor
- Throws:
IOException
-
compress
- Overrides:
compress
in classVeniceCompressor
- Throws:
IOException
-
compressInternal
- Specified by:
compressInternal
in classVeniceCompressor
- Throws:
IOException
-
hashCode
public int hashCode() -
decompress
- Overrides:
decompress
in classVeniceCompressor
- Throws:
IOException
-
decompressInternal
- Specified by:
decompressInternal
in classVeniceCompressor
- Throws:
IOException
-
decompress
- Overrides:
decompress
in classVeniceCompressor
- Throws:
IOException
-
decompressInternal
- Specified by:
decompressInternal
in classVeniceCompressor
- Throws:
IOException
-
decompressAndPrependSchemaHeader
public ByteBuffer decompressAndPrependSchemaHeader(byte[] data, int offset, int length, int schemaHeader) throws IOException Description copied from class:VeniceCompressor
This method tries to decompress data and maybe prepend the schema header. The returned ByteBuffer will be backed by byte array that starts with schema header, followed by the decompressed data. The ByteBuffer will be positioned at the beginning of the decompressed data and the remaining of the ByteBuffer will be the length of the decompressed data.- Overrides:
decompressAndPrependSchemaHeader
in classVeniceCompressor
- Throws:
IOException
-
decompressAndPrependSchemaHeaderInternal
protected ByteBuffer decompressAndPrependSchemaHeaderInternal(byte[] data, int offset, int length, int schemaHeader) throws IOException - Specified by:
decompressAndPrependSchemaHeaderInternal
in classVeniceCompressor
- Throws:
IOException
-
decompress
- Overrides:
decompress
in classVeniceCompressor
- Throws:
IOException
-
decompressInternal
- Specified by:
decompressInternal
in classVeniceCompressor
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classVeniceCompressor
- Throws:
IOException
-
closeInternal
- Specified by:
closeInternal
in classVeniceCompressor
- Throws:
IOException
-
equals
-