Lines Matching refs:offset
61 var offset = (int)(Length % BitsPerSegment); in EnsureIsAligned()
62 if(offset != 0) in EnsureIsAligned()
70 var offset = (int)(Length % BitsPerSegment); in AppendBit()
71 if(offset == 0) in AppendBit()
79 segments[segmentId] |= (byte)(1 << offset); in AppendBit()
88 … public void AppendMaskedValue(uint value, uint offset = 0, uint length = 32, bool msbFirst = true) in AppendMaskedValue() argument
91 var bits = BitHelper.GetBits(value).Skip((int)offset).Take((int)length); in AppendMaskedValue()
102 public byte AsByte(uint offset = 0, int length = 8) in AsByte() argument
109 if(offset >= Length || length <= 0) in AsByte()
115 var firstSegment = (int)(offset / BitsPerSegment); in AsByte()
116 var segmentOffset = (int)(offset % BitsPerSegment); in AsByte()
147 public byte[] AsByteArray(uint offset, uint length) in AsByteArray() argument
152 result[i] = AsByte(offset + 8 * i); in AsByteArray()
157 public uint AsUInt32(uint offset = 0, int length = 32) in AsUInt32() argument
164 return (AsByte(offset, length) in AsUInt32()
165 | (uint)AsByte(offset + 8, length - 8) << 8 in AsUInt32()
166 | (uint)AsByte(offset + 16, length - 16) << 16 in AsUInt32()
167 | (uint)AsByte(offset + 24, length - 24) << 24); in AsUInt32()
170 public ulong AsUInt64(uint offset = 0, int length = 64) in AsUInt64() argument
177 return AsUInt32(offset, length) in AsUInt64()
178 | (ulong)AsUInt32(offset + 32, length - 32) << 32; in AsUInt64()