Bzip2.cs 697 B

12345678910111213141516171819202122232425
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System.IO;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO.Compression
  5. {
  6. using Impl = Utilities.Bzip2;
  7. internal static class Bzip2
  8. {
  9. internal static Stream CompressOutput(Stream stream, bool leaveOpen = false)
  10. {
  11. return leaveOpen
  12. ? new Impl.CBZip2OutputStreamLeaveOpen(stream)
  13. : new Impl.CBZip2OutputStream(stream);
  14. }
  15. internal static Stream DecompressInput(Stream stream)
  16. {
  17. return new Impl.CBZip2InputStream(stream);
  18. }
  19. }
  20. }
  21. #pragma warning restore
  22. #endif