web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    236,172 Most Valuable Professional on at
    Unzip a Dynamics Ax 2009 compressed file
    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.
  • JK-30051008-0 Profile Picture
    13 on at
    Unzip a Dynamics Ax 2009 compressed file
    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
    236,172 Most Valuable Professional on at
    Unzip a Dynamics Ax 2009 compressed file
    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
    Unzip a Dynamics Ax 2009 compressed file
    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
    236,172 Most Valuable Professional on at
    Unzip a Dynamics Ax 2009 compressed file
    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
    Unzip a Dynamics Ax 2009 compressed file
    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
    236,172 Most Valuable Professional on at
    Unzip a Dynamics Ax 2009 compressed file
    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
    Unzip a Dynamics Ax 2009 compressed file
    @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
    236,172 Most Valuable Professional on at
    Unzip a Dynamics Ax 2009 compressed file
    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,352

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 810 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 616 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans