[cmp] add decompression support

* Adds .Z, .gz, .lzma, .xz and .bz2 decompression support for DD images
  using the Bled library (https://github.com/pbatard/bled).
* Closes #269
This commit is contained in:
Pete Batard 2014-12-29 20:34:41 +00:00
parent 3f0e71f3ba
commit 7599715ae6
56 changed files with 10020 additions and 89 deletions

View file

@ -3,7 +3,7 @@
* Compensating for what Microsoft should have done a long long time ago.
* Also see http://utf8everywhere.org/
*
* Copyright © 2010-2013 Pete Batard <pete@akeo.ie>
* Copyright © 2010-2014 Pete Batard <pete@akeo.ie>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -28,6 +28,7 @@
#include <shlwapi.h>
#include <setupapi.h>
#include <direct.h>
#include <io.h>
#pragma once
#if defined(_MSC_VER)
@ -721,6 +722,15 @@ static __inline FILE* fopenU(const char* filename, const char* mode)
return ret;
}
static __inline int _openU(const char *filename, int oflag , int pmode)
{
int ret = -1;
wconvert(filename);
ret = _wopen(wfilename, oflag, pmode);
wfree(filename);
return ret;
}
// returned UTF-8 string must be freed
static __inline char* getenvU(const char* varname)
{