C#: Expose byte array compress and decompress#106008
Conversation
paulloz
left a comment
There was a problem hiding this comment.
Hi! Thank you for your contribution.
This is indeed missing from the C# API, and I think some compression methods might not be available through System.IO.Compression. We'd rather have the new methods defined in GD, though, alongside the implementations of IsEmpty(), Join(), and Stringify().
e276a3c to
75bcf85
Compare
paulloz
left a comment
There was a problem hiding this comment.
Works fine, and looks good to me!
@raulsntos do we want to make compressionMode optional, and default to FileAccess.CompressionMode.Fastlz like the GDScript API?
|
Just my opinion, I think it's less than ideal to make the argument optional. In addition, fastlz is a relatively old compression and doesn't have much advantages compared to modern compression such as zstd or lz4. https://github.com/inikep/lzbench/blob/master/doc/lzbench20_sorted.md. |
|
I think it makes sense to match unless we had a strong reason not to, but I don't have a strong opinion either way. |
75bcf85 to
fc8328d
Compare
|
Thanks! |
Expose the C# equivalent to
PackedByteArray.compress,PackedByteArray.decompressandPackedByteArray.decompress_dynamic.