public StreamOptions() { MaxInMemoryBuffer = 1024 * 1024 * 256; InitialInMemoryBuffer = 1024 * 1024 * 4; Comparator = new ByteWiseComparator(); FilterPolicy = new BloomFilterPolicy(caseInsensitive: false); Storage = new InMemoryLowLevelStorage(BufferPool); }
public InMemoryFileStream(BufferPool bufferPool, string name, InMemoryLowLevelStorage storage) : base(bufferPool) { _name = name; _storage = storage; Tuple<byte[], long> value; if(_storage._files.TryRemove(name, out value)) _storage._bufferPool.Return(value.Item1); }