public virtual string ReadString(int bitCount) { StringBlockHandler handler = _fileReader.FindBlockHandler <StringBlockHandler>(BlockIdentifier.StringBlock); var stringIdentifier = Read <uint>(bitCount); return(handler[stringIdentifier]); }
public AlignedRecordReader(IBinaryStorageFile fileReader, int recordSize) { _stringBlock = fileReader.FindBlockHandler <StringBlockHandler>(BlockIdentifier.StringBlock); _stagingBuffer = new byte[recordSize + 8]; _byteCursor = 0; }
public UnalignedRecordReader(IBinaryStorageFile fileReader, long recordSize) { _fileReader = fileReader; _recordSize = recordSize; // Allocating 7 extra bytes to guarantee we don't ever read out of our memory space _recordData = MemoryPool <byte> .Shared.Rent((int)(recordSize + 7)); _stringBlock = _fileReader.FindSegment(SegmentIdentifier.StringBlock)?.Handler as StringBlockHandler; // Read exactly what we need fileReader.DataStream.Read(_recordData.Memory.Span.Slice(0, (int)recordSize)); }
public ByteAlignedRecordReader(IBinaryStorageFile fileReader, int recordSize) { _stringBlock = fileReader.FindSegment(SegmentIdentifier.StringBlock)?.Handler as StringBlockHandler; _stagingBuffer = new byte[recordSize + 8]; // Allocating 8 extra bytes for packed reads to make sure we don't start reading another process's memory out of bad luck }
public AlignedSequentialRecordReader(StringBlockHandler stringBlock) { _stringBlock = stringBlock; }
public WithStringBlock(StringBlockHandler stringBlock, int recordSize) : base(recordSize) => _stringBlock = stringBlock;