public class CompressedArray extends Object
| Constructor and Description | 
|---|
| CompressedArray() | 
| CompressedArray(int _segments,
               int entriesPerSeg,
               int approxBytesPerEntry) | 
| Modifier and Type | Method and Description | 
|---|---|
| float | calcMemInMB() | 
| static byte[] | compress(byte[] value,
        int offset,
        int length,
        int compressionLevel)Compresses the specified byte range using the specified compressionLevel (constants are
 defined in java.util.zip.Deflater). | 
| static byte[] | decompress(byte[] value)Decompress the byte array previously returned by compress | 
| void | flush() | 
| GHPoint | get(long index) | 
| CompressedArray | setCompressionLevel(int compressionLevel) | 
| void | write(double lat,
     double lon) | 
public CompressedArray()
public CompressedArray(int _segments,
                       int entriesPerSeg,
                       int approxBytesPerEntry)
_segments - initialize with this number of segmentsentriesPerSeg - a static number which sets the entries per segmentapproxBytesPerEntry - an *approximate* number (as entries can have different lengths)public static byte[] compress(byte[] value,
                              int offset,
                              int length,
                              int compressionLevel)
public static byte[] decompress(byte[] value)
                         throws DataFormatException
DataFormatExceptionpublic CompressedArray setCompressionLevel(int compressionLevel)
public void write(double lat,
                  double lon)
public GHPoint get(long index)
public void flush()
public float calcMemInMB()
Copyright © 2012–2020. All rights reserved.