C# Class HdrHistogram.HistogramEncoding

Exposes functionality to encode and decode HistogramBase types.
Mostrar archivo Open project: HdrHistogram/HdrHistogram.NET Class Usage Examples

Public Methods

Method Description
DecodeFromByteBuffer ( ByteBuffer buffer, long minBarForHighestTrackableValue, DeflateStream decompressor = null ) : HistogramBase

Construct a new histogram by decoding it from a ByteBuffer.

DecodeFromCompressedByteBuffer ( ByteBuffer buffer, long minBarForHighestTrackableValue ) : HistogramBase

Construct a new histogram by decoding it from a compressed form in a ByteBuffer.

EncodeIntoCompressedByteBuffer ( this source, ByteBuffer targetBuffer ) : int

Encode this histogram in compressed form into a ByteBuffer.

GetEncodingCookie ( this histogram ) : int

Gets the encoding cookie for a Histogram.

Private Methods

Method Description
Create ( Type histogramType, IHeader header, long minBarForHighestTrackableValue ) : HistogramBase
GetBestTypeForWordSize ( int wordSizeInBytes ) : Type
GetCompressedEncodingCookie ( ) : int
GetCookieBase ( int cookie ) : int
GetHeaderSize ( int cookie ) : int
GetWordSizeInBytesFromCookie ( int cookie ) : int
PayLoadSourceBuffer ( ByteBuffer buffer, DeflateStream decompressor, int expectedCapacity, IHeader header ) : ByteBuffer
ReadHeader ( ByteBuffer buffer ) : IHeader

Method Details

DecodeFromByteBuffer() public static method

Construct a new histogram by decoding it from a ByteBuffer.
public static DecodeFromByteBuffer ( ByteBuffer buffer, long minBarForHighestTrackableValue, DeflateStream decompressor = null ) : HistogramBase
buffer ByteBuffer The buffer to decode from
minBarForHighestTrackableValue long Force highestTrackableValue to be set at least this high
decompressor System.IO.Compression.DeflateStream The that is being used to decompress the payload. Optional.
return HistogramBase

DecodeFromCompressedByteBuffer() public static method

Construct a new histogram by decoding it from a compressed form in a ByteBuffer.
public static DecodeFromCompressedByteBuffer ( ByteBuffer buffer, long minBarForHighestTrackableValue ) : HistogramBase
buffer ByteBuffer The buffer to decode from
minBarForHighestTrackableValue long Force highestTrackableValue to be set at least this high
return HistogramBase

EncodeIntoCompressedByteBuffer() public static method

Encode this histogram in compressed form into a ByteBuffer.
public static EncodeIntoCompressedByteBuffer ( this source, ByteBuffer targetBuffer ) : int
source this The histogram to encode
targetBuffer ByteBuffer The buffer to write to
return int

GetEncodingCookie() public static method

Gets the encoding cookie for a Histogram.
public static GetEncodingCookie ( this histogram ) : int
histogram this The histogram to get the cookie for
return int