public void Read(BinaryReader reader, SchemaElement schema, IList destination, long maxValues)
        {
            int bitWidth = reader.ReadByte();
            int length   = GetRemainingLength(reader);

            RunLengthBitPackingHybridValuesReader.ReadRleBitpackedHybrid(reader, bitWidth, length, (List <int>)destination, maxValues);
        }
        public void Read(BinaryReader reader, SchemaElement schema, IList destination, long maxValues)
        {
            int bitWidth = reader.ReadByte();

            //when bit width is zero reader must stop and just repeat zero maxValue number of times
            if (bitWidth == 0)
            {
                destination.AddRange(Enumerable.Repeat(0, (int)maxValues));
                return;
            }

            int length = GetRemainingLength(reader);

            RunLengthBitPackingHybridValuesReader.ReadRleBitpackedHybrid(reader, bitWidth, length, (List <int>)destination);
        }
예제 #3
0
        public static List <int> Read(BinaryReader reader, long maxValues)
        {
            var result   = new List <int>();
            int bitWidth = reader.ReadByte();

            //when bit width is zero reader must stop and just repeat zero maxValue number of times
            if (bitWidth == 0)
            {
                for (int i = 0; i < maxValues; i++)
                {
                    result.Add(0);
                }
                return(result);
            }

            int length = GetRemainingLength(reader);

            RunLengthBitPackingHybridValuesReader.ReadRleBitpackedHybrid(reader, bitWidth, length, result);
            return(result);
        }