1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-11 03:23:29 +08:00

Add CompressSave, with Chinese instructions in READMEs

This commit is contained in:
2022-09-14 17:34:15 +08:00
parent 8117ee7659
commit c49378412e
37 changed files with 11924 additions and 94 deletions

View File

@@ -0,0 +1,50 @@
using System;
using System.IO;
namespace CompressSave.LZ4Wrap;
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 BlackHoleStream()
{
}
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;
}
public 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));
}
}