public class ChunkEncoderFactory extends Object
ChunkEncoder
implementations, based on criteria
such as "fastest available" or "safe to run anywhere".Constructor and Description |
---|
ChunkEncoderFactory() |
Modifier and Type | Method and Description |
---|---|
static ChunkEncoder |
optimalInstance()
Convenience method, equivalent to:
return optimalInstance(LZFChunk.MAX_CHUNK_LEN);
|
static ChunkEncoder |
optimalInstance(int totalLength)
Method to use for getting compressor instance that uses the most optimal
available methods for underlying data access.
|
static ChunkEncoder |
optimalNonAllocatingInstance(int totalLength)
Factory method for constructing encoder that is always passed buffer
externally, so that it will not (nor need) allocate encoding buffer.
|
static ChunkEncoder |
safeInstance()
Convenience method, equivalent to:
return safeInstance(LZFChunk.MAX_CHUNK_LEN);
|
static ChunkEncoder |
safeInstance(int totalLength)
Method that can be used to ensure that a "safe" compressor instance is loaded.
|
static ChunkEncoder |
safeNonAllocatingInstance(int totalLength)
Factory method for constructing encoder that is always passed buffer
externally, so that it will not (nor need) allocate encoding buffer.
|
public static ChunkEncoder optimalInstance()
return optimalInstance(LZFChunk.MAX_CHUNK_LEN);
public static ChunkEncoder optimalInstance(int totalLength)
safeInstance()
.totalLength
- Expected total length of content to compress; only matters
for content that is smaller than maximum chunk size (64k), to optimize
encoding hash tablespublic static ChunkEncoder optimalNonAllocatingInstance(int totalLength)
public static ChunkEncoder safeInstance()
return safeInstance(LZFChunk.MAX_CHUNK_LEN);
public static ChunkEncoder safeInstance(int totalLength)
totalLength
- Expected total length of content to compress; only matters
for content that is smaller than maximum chunk size (64k), to optimize
encoding hash tablespublic static ChunkEncoder safeNonAllocatingInstance(int totalLength)
Copyright © 2013. All rights reserved.