web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Unzip a Dynamics Ax 2009 compressed file

(2) ShareShare
ReportReport
Posted on by 13
Can someone tell me how to unzip a binary file that was compressed in Dynamix Ax 2009 ?
 
I am trying to do this in C#
 
The documentation says it is done in lz77, but I have had no luck yet
 
For information this is a code in X++ that can unzip the file
binData = new BinData();
binData.setData(_blobData);
binData.decompressLZ77();
data = ContainerClass::blob2Container(binData.getData());
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    240,538 Most Valuable Professional on at
    I believe that LZ77 is just one of several algorithms that can be used by ZIP.
     
    Two options I can think of is calling a ZIP software (e.g. 7zip) command-line interface, or using a third-party .NET library (such as DotNetZip) through .NET Interop.
     
    Moved from Integration, Dataverse, and general topics forum to Finance | Project Operations, Human Resources, AX, GP, SL forum.
  • JK-30051008-0 Profile Picture
    13 on at
    @Martin Dráb thanks for answer.
    I have already tried the things you suggest with no luck. :/
    I seems like there is some custom format on the zipped files, that only Ax can read and unzip.
  • Martin Dráb Profile Picture
    240,538 Most Valuable Professional on at
    If you're saying that you have a file that can't be unzipped by any ZIP software, then it probably isn't a ZIP file. Do you know how the file was created? Just saying that it was done AX 2009 isn't sufficient.
  • JK-30051008-0 Profile Picture
    13 on at
    here is the Ax 2009 code that zipped the file, can you tell me how to unzip it using C# ?
     
    BinData binData = new BinData();
    Blob compressedBlob;
    // Convert container to binary
    binData.setData(ContainerClass::container2Blob(data));
    // Compress using LZ77
    binData.compressLZ77();
    // Get the compressed data as a Blob
    compressedBlob = binData.getData();

     
  • Martin Dráb Profile Picture
    240,538 Most Valuable Professional on at
    I can't - I don't know what AX kernel does there under the hood. You could try LZ77 directly, e.g. with Lz77Compressor, but don't you rather want to create a ZIP file instead?
  • JK-30051008-0 Profile Picture
    13 on at
    yeah I wish the one who wrote the code 15 years ago would have just used standard zipping method.  But now I am stuck with a bunch of custom zipped files.
  • Martin Dráb Profile Picture
    240,538 Most Valuable Professional on at
    As I understand, you're able to decompress the file in AX but not C#. If you're "stuck with a bunch of custom zipped files", can't you use X++ to decompress them and save to disk?
     
    It might help if you give us a bit more information about your scenario.
  • JK-30051008-0 Profile Picture
    13 on at
    I want to do this in C#.
    I think it is clear that that is not possible.

    Thanks for your replies anyway Martin
  • Martin Dráb Profile Picture
    240,538 Most Valuable Professional on at
    I wouldn't say it's impossible; I even suggested an already existing solution you could try. But of course, it may be quite time-consuming, therefore if you can abandon the idea as impossible, it may be a good thing to do.
     
    Personally, I would claim that "I want to do this in C#" isn't a strong enough argument to justify the investment.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 341 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 312

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 262 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans