CompressionMethod.Deflate doesn't work on Mono in Windows
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
The thing is that System.IO.DeflateStream is used. And it uses system implementation if gzip (thats why it doesn't work on Windows at least). One good idea is to use SharpZipLib - it is a pure C# implementation of zip. What do you think, @sta ?
System.DllNotFoundException: MonoPosixHelper
at (wrapper managed-to-native) System.IO.Compression.DeflateStream:CreateZStream (System.IO.Compression.CompressionMode,bool,System.IO.Compression.DeflateStream/UnmanagedReadOrWrite,intptr)
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip) [0x00000] in <filename unknown>:0
at System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Compression.DeflateStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode,bool)
at WebSocketSharp.Ext.compress (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at WebSocketSharp.Ext.Compress (System.IO.Stream stream, CompressionMethod method) [0x00000] in <filename unknown>:0
at WebSocketSharp.WebSocket.send (Opcode opcode, System.IO.Stream stream) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at WebSocketSharp.Ext.compress and Ext.Compress, where the stack trace shows System.IO.DeflateStream failing under Mono on Windows. Reproduce the Deflate path in the reported Unity environment and review the proposed SharpZipLib option. Done should mean CompressionMethod.Deflate works without the MonoPosixHelper failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100