1
0
mirror of https://github.com/soarqin/DSP_Mods_TO.git synced 2025-12-18 20:43:30 +08:00

Moved CompressSave here

This commit is contained in:
2023-12-20 15:54:17 +08:00
parent 0d6493edd2
commit 6f224902f8
46 changed files with 12915 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.IO;
namespace CompressSave.Wrapper;
class BlackHoleStream : Stream
{
private long _length;
public override bool CanRead => true;
public override bool CanSeek => false;
public override bool CanWrite => true;
public override long Length => _length;
public override long Position { get; set; }
public override void Flush()
{
}
public override int Read(byte[] buffer, int offset, int count)
{
return count;
}
public override long Seek(long offset, SeekOrigin origin)
{
throw new NotImplementedException();
}
public override void SetLength(long value)
{
_length = value;
}
private readonly byte[] _testBuffer = new byte[1024 * 1024];
public override void Write(byte[] buffer, int offset, int count)
{
Array.Copy(buffer, offset, _testBuffer, 0, Math.Min(count, _testBuffer.Length));
}
}