Is there a gzip library available for Rust? [closed] - zlib

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
My searches have found:
The flate library, based on miniz. Edit: as Mark Adler points out, this is a zlib library, but does not deal with gzip headers.
Snappy bindings, which don't compile on modern Rust.

Edit: there is now flate2, libflate and deflate.
So I combined dbaupp's and Mark Adler's advice, and created a gzip-decompressor: https://github.com/alexcrichton/rust-compress/pull/30
However, it turns out that Mr Crichton already wrote a gzip layer: https://github.com/alexcrichton/flate2-rs
For now, those two options exist; it remains to be seen what ends up as the standard Rust solution.

flate generates and processes both raw and zlib-wrapped deflate streams. A gzip stream, which is what gunzip, zcat, etc. work on, is a gzip-wrapped deflate stream. If you want to use flate, then you need to first process the gzip header, then use flate to decompress the deflate data, and then process the gzip trailer. The gzip header and trailer is documented in RFC 1952.

Related

Small YAML/JSON parser in C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've been looking for a small YAML/JSON parser, preferably a single-file solution, so i can easily embed it on my application. I'm looking for a small and simple solution since i intend to use it on different platforms, and building libyaml and other solutions will be a huge pain in the ass.
Also, is TinyXML a good alternative? What is fastest to parse?
I was looking for something similar sometime last year. This is the one I settled on:
YAJL
It's not a single file solution, but it's not very big either. I has some features like JSON formatting and syntax checking that you might see as feature bloat, but they don't bother me.

Open source ANSI C99 parser? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm interested in playing around with adding some language features on top of C and I'm trying to find a good open source parser that I could fork to play with making grammar changes, but I'm not having any lucky just yet. Does anyone know of a good "standalone" parser that would be amenable to modification in this way?
If you're writing it in Python, you can use pycparser. It's a fully compliant C99 parser licensed under the 3-clause BSD license.

Using the C Preprocessor for code cleanup [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a large, legacy C code base to look at, and there are lots of #ifdefs and #ifndefs throughout the code, mostly to maintain backwards compatibility with environments and operating systems that now no longer exist.
Is there any preprocessor-like tool that I could run this code through, that would take in all these C (mainly .c and .h, some .cpp etc) code and output set of source files getting rid of those blocks of code that would otherwise never be relevant? That would certainly make browsing the code easier for me, in addition to, perhaps cleaning it up in the in the long run.
You can use coan for this. Read the "About" page and the man page.
The spin command can output your cleaned up sources under a directory of your
choice.

What are some common C libraries in Linux to use a CD burning device? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am interested in creating software that uses a CD burning device. I will be writing this code in C under Linux and compiling using GCC.
libburn as the name suggests ;) (and other friend-libraries from the same site). It's used in brasero (GNOME), xfburn (xfce) and cdw.
And well, that's it. Really, I'm not aware of any more libraries.
In fact, it was more common to wrap command-line cdrecord (from cdrtools or cdrkit) but they never provided a shared library; it was just an old unix practice on running external executables (and then parsing their output, ugly). AFAIK it's still used in k3b and a few minor tools but the general trend is migration towards libburn.

Open-source PSNR/ SSIM C implementation without OpenCV? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there any open source C implementation for PSNR, SSIM or MSE that doesn't rely on OpenCV?
Thanks.
IQA provides a C implementation with no dependencies of the following image quality metrics:
MSE
PSNR
SSIM
MS-SSIM
MS-SSIM*
Google's WebM project provides these calculations in the libvpx library. Specifically in the VP8 encoder.
Then there is also NetPBM, FFMPEG and the x264 Project.

Resources