Delta Compression API from Microsoft

Yet another interesting MS API: Delta Compression Application Programming Interfaces.

I wasn’t aware of it until I check dependencies of squirrel.windows (another interesting thing which will justify a blog post of it’s own). squirrel.windows use DeltaCompressionDotNet (nuget). This is a thin wrapper around Delta Compression API.

Delta Compression API is made of two historical API: PatchAPI and MSDelta. Second one is the evolution of first one. MSDelta provides:

  • removed Windows XP support,
  • API simplified but with some loss (progression calback seems to be phased out),
  • more file format with special handling (knowing file format permits to compute delta more effectively),
  • more memory consumption mainly during delta creation phase.

DeltaCompressionDotNet is more simpler. Creating delta is as simple as:

var compression = new MsDeltaCompression(); /* or PatchApiCompression(); */
compression.CreateDelta(sourcePath, destinationPath, deltaPath);

and applying delta:

var compression = new MsDeltaCompression(); /* or PatchApiCompression(); */
compression.ApplyDelta(deltaPath, sourcePath, destinationPath);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s