The Data Compression News Blog

All about the most recent compression techniques, algorithms, patents, products, tools and events.

Subscribe

Posts: RSS Feed
Comments: RSS Feed

Sponsored Links

Recent Posts

  • Bijective BWT (7 Comments)

    David Scott has written a bijective BWT transform, which brings all the advantages of bijectiveness to BWT based compressors. Among other things, making BWT more suitable for compression-before-encryption and also give (slightly) better compression.

  • Asymmetric Binary System (116 Comments)

    Jarek Duda’s “Asymmetric Binary System” promises to be an alternate to arithmetic coding, having all the advantages, but being much simpler. Matt has coded a PAQ based compressor using ABS for back-end encoding. Update: Andrew Polar has written an alternate implementation of ABS.

  • Precomp: More Compression for your Compressed Files (3 Comments)

    So many of today’s files are already compressed (using old, outdated algorithms) that newer algorithms don’t even get a chance to touch them. Christian Schneider’s Precomp comes to rescue by undoing the harm.

  • On2 Technologies is Hiring

    There aren’t too many companies working on cutting edge codecs, and of those few this one is hiring. Best of luck.

  • China’s AVS Specifications Available (2 Comments)

    Its old news that China has developed their own Advanced Video Standard to avoid high licensing fees. English translation of the standard is now available, along with the IPR policy. Finally something technical that you can get your hands on to feed your appetite.

SafeDeflateStream

Posted by Mark Nelson on 24th January 2006 | Permanent Link

Jason Thomas gives Microsoft props for integrating deflate code into .NET 2.0:


With .NET 2.0, Microsoft finally decided to integrate the deflate algorithm into the framework. Great! This means, we no longer need to buy the Component One library and modify it to true asynchronous usage, or to hack ICSharpCodes for similar functionality.

But just as Jason giveth, Jason can taketh away:


Unfortunately, Microsoft’s implementation suffers a severe problem. If you are decompressing a stream using async methods (BeginRead) and the stream is corrupt, the framework throws an un-catchable exception from which you cannot recover.

Yeah, this is a serious bummer. It’s not necessarily so bad if your code is living in a highly controlled environment, but if you need to accept input from the wild, there’s no telling what you might get. So Jason cooked up a C# wrapper class that catches exceptions, even when using asynch methods. Thanks Jason!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>