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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidbyte[]compress(byte[] data) compress(ByteBuffer data, int startPositionOfOutput) protected byte[]compressInternal(byte[] data) protected ByteBuffercompressInternal(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 ByteBufferdecompressAndPrependSchemaHeaderInternal(byte[] data, int offset, int length, int schemaHeader) protected ByteBufferdecompressInternal(byte[] data, int offset, int length) protected InputStreamdecompressInternal(InputStream inputStream) protected ByteBufferdecompressInternal(ByteBuffer data) booleaninthashCode()Methods inherited from class com.linkedin.venice.compression.VeniceCompressor
getCompressionStrategy
-
Constructor Details
-
NoopCompressor
public NoopCompressor()
-
-
Method Details
-
compress
- Overrides:
compressin classVeniceCompressor- Throws:
IOException
-
compressInternal
- Specified by:
compressInternalin classVeniceCompressor- Throws:
IOException
-
compress
- Overrides:
compressin classVeniceCompressor- Throws:
IOException
-
compressInternal
- Specified by:
compressInternalin classVeniceCompressor- Throws:
IOException
-
hashCode
public int hashCode() -
decompress
- Overrides:
decompressin classVeniceCompressor- Throws:
IOException
-
decompressInternal
- Specified by:
decompressInternalin classVeniceCompressor- Throws:
IOException
-
decompress
- Overrides:
decompressin classVeniceCompressor- Throws:
IOException
-
decompressInternal
- Specified by:
decompressInternalin classVeniceCompressor- Throws:
IOException
-
decompressAndPrependSchemaHeader
public ByteBuffer decompressAndPrependSchemaHeader(byte[] data, int offset, int length, int schemaHeader) throws IOException Description copied from class:VeniceCompressorThis 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:
decompressAndPrependSchemaHeaderin classVeniceCompressor- Throws:
IOException
-
decompressAndPrependSchemaHeaderInternal
protected ByteBuffer decompressAndPrependSchemaHeaderInternal(byte[] data, int offset, int length, int schemaHeader) throws IOException - Specified by:
decompressAndPrependSchemaHeaderInternalin classVeniceCompressor- Throws:
IOException
-
decompress
- Overrides:
decompressin classVeniceCompressor- Throws:
IOException
-
decompressInternal
- Specified by:
decompressInternalin classVeniceCompressor- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classVeniceCompressor- Throws:
IOException
-
closeInternal
- Specified by:
closeInternalin classVeniceCompressor- Throws:
IOException
-
equals
-