HdrHistogram.HistogramBase.GetNeededByteBufferCapacity C# (CSharp) Method

GetNeededByteBufferCapacity() public method

Get the capacity needed to encode this histogram into a ByteBuffer
public GetNeededByteBufferCapacity ( ) : int
return int
        public int GetNeededByteBufferCapacity()
        {
            return GetNeededByteBufferCapacity(CountsArrayLength);
        }

Same methods

HistogramBase::GetNeededByteBufferCapacity ( int relevantLength ) : int

Usage Example

示例#1
0
        private static HistogramBase CompressedEncodeDecode(HistogramBase source)
        {
            var targetBuffer = ByteBuffer.Allocate(source.GetNeededByteBufferCapacity());

            source.EncodeIntoCompressedByteBuffer(targetBuffer);
            targetBuffer.Position = 0;
            return(HistogramEncoding.DecodeFromCompressedByteBuffer(targetBuffer, 0));
        }
All Usage Examples Of HdrHistogram.HistogramBase::GetNeededByteBufferCapacity