GZip Support
With the C/AL Open Library there was a GZip support. In version 15 there is no corresponding module?
What is the status? We need GZip support too for our products.
Gzip support is needed for app source readiness in our product.
@JesperSchulz
We need Gzip support as well to increase web service performance.
@JesperSchulz any progress for this request?
Please allow me to forward your issue to the engineers, who made the Data Compression module. They will get back to you asap!
And sorry about the delayed response. I had set up a too restrictive mail rule which ate all of my notifications :-(
If you want to open a GZip archive stream and read its entries, you can do so by: DataCompression.OpenZipArchive(GzipInStream, false); If you want to create an archive in Gzip format - we don't support that in Data Compression module. Please keep in mind that we never had a wrapper for GZipStream .NET class in BaseApp - we use GZipStream .NET class directly in a few places in BaseApp.
If you would like to get the ability of compressing a stream by using GZip compression with Data Compression module, please log an idea on our ideas forum https://aka.ms/BusinessCentralideas
Actually, we do have a .NET wrapper as well: Codeunit 3036 DotNet_GzipStream. It will also allow you to do a few things with GZip! And instead of creating an Idea (which may take time to get accepted and implemented), you are more than welcome to create a pull request right in this repo and add the functionality to the Data Compression module you are missing! We will process those PRs as quickly as we can.
The wrapper DotNet_GzipStream would be perfect, I used that one together with DotNet_CompressionMode to decompress Gzip streams in BC14. But in BC15 I can't find either of those .NET wrappers. Am I missing something?
DataCompression.OpenZipArchive(GzipInStream, false) unfortunately throws an error when it's used with Gzip Streams:
This makes kind of sense I guess (?) since Gzip files lack the EOCD signature.
That is odd! That wrapper should only have been removed, if the new module fulfills the requirements which the wrapper fulfilled. That is an honest mistake. I will create a bug right away to address the shortcomings! Our apologies!
And again, if you need even more functionality, please don't hesitate to contribute to the module! We'd be happy to bring in your code to make the module more capable.
The fix is checked in and will be available in the next minor release of Business Central 15. Data Compression will have these methods: DataCompression.GZipCompress(InputStream: InStream; CompressedStream: OutStream); DataCompression.GZipDecompress(InputStream: InStream; DecompressedStream: OutStream); DataCompression.IsGZip(InputStream: InStream): Boolean;
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.