public class CompressionMetadata
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CompressionMetadata.Chunk
Holds offset and length of the file chunk
|
static class |
CompressionMetadata.Writer |
Modifier and Type | Field and Description |
---|---|
long |
compressedFileLength |
long |
dataLength |
java.lang.String |
indexFilePath |
CompressionParameters |
parameters |
Modifier and Type | Method and Description |
---|---|
CompressionMetadata.Chunk |
chunkFor(long position)
Get a chunk of compressed data (offset, length) corresponding to given position
|
int |
chunkLength() |
void |
close() |
ICompressor |
compressor() |
static CompressionMetadata |
create(java.lang.String dataFilePath)
Create metadata about given compressed file including uncompressed data length, chunk size
and list of the chunk offsets of the compressed data.
|
CompressionMetadata.Chunk[] |
getChunksForSections(java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections) |
public final long dataLength
public final long compressedFileLength
public final java.lang.String indexFilePath
public final CompressionParameters parameters
public static CompressionMetadata create(java.lang.String dataFilePath)
dataFilePath
- Path to the compressed filepublic ICompressor compressor()
public int chunkLength()
public CompressionMetadata.Chunk chunkFor(long position)
position
- Position in the file.public CompressionMetadata.Chunk[] getChunksForSections(java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections)
sections
- Collection of sections in uncompressed filepublic void close()
Copyright © 2013 The Apache Software Foundation