//------------------------------------------------------------ // Game Framework // Copyright © 2013-2021 loyalsoft. All rights reserved. // Homepage: http://www.game7000.com/ // Feedback: http://www.game7000.com/ //------------------------------------------------------------ using System.IO; namespace GameFramework { public static partial class Utility { public static partial class Compression { /// /// 压缩解压缩辅助器接口。 /// public interface ICompressionHelper { /// /// 压缩数据。 /// /// 要压缩的数据的二进制流。 /// 要压缩的数据的二进制流的偏移。 /// 要压缩的数据的二进制流的长度。 /// 压缩后的数据的二进制流。 /// 是否压缩数据成功。 bool Compress(byte[] bytes, int offset, int length, Stream compressedStream); /// /// 压缩数据。 /// /// 要压缩的数据的二进制流。 /// 压缩后的数据的二进制流。 /// 是否压缩数据成功。 bool Compress(Stream stream, Stream compressedStream); /// /// 解压缩数据。 /// /// 要解压缩的数据的二进制流。 /// 要解压缩的数据的二进制流的偏移。 /// 要解压缩的数据的二进制流的长度。 /// 解压缩后的数据的二进制流。 /// 是否解压缩数据成功。 bool Decompress(byte[] bytes, int offset, int length, Stream decompressedStream); /// /// 解压缩数据。 /// /// 要解压缩的数据的二进制流。 /// 解压缩后的数据的二进制流。 /// 是否解压缩数据成功。 bool Decompress(Stream stream, Stream decompressedStream); } } } }