1

With the introduction of Business Central 2023 Wave 1, commonly known as Business Central 22 (BC22), the underlying platform is using a newer .NET framework. As a result, the checks when decompressing binary data has become more strict. It is good in a way as it is important to maintain data integrity and security.


However, with the introduction of BC22, streams of data compressed using the deflate format does not work anymore. It is supported by the underlying .NET compression classes but methods related to DeflateStream must be exposed in BC to be used.


I can't say this is a bug in BC22 as the underlying .NET used in BC21 was more relaxed.


The deflate format is commonly used in PDF documents to compress binary data. It is specifically used in PDF/A-3 archive format used for electronic invoices in multiple countries and with the introduction of BC22 the document attachments can't be extracted within BC22.


By extending the "Data Compression" Codeunit with 2 procedures that uses underlying DeflateStream, it makes it possible and easy to extract or in general process the simple but useful Deflate compression format.


Sample wanted code support:


                DataCompression.GZipCompress(InputInstream, CompressedOutStream);

                DataCompression.GZipDecompress(InputInstream, DecompressedOutStream);


                // Wanted Deflate functionality

                DataCompression.DeflateCompress(InputInstream, CompressedOutStream);

                DataCompression.DeflateDecompress(InputInstream, DecompressedOutStream);


Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team