Skip to content

Instantly share code, notes, and snippets.

@beakr
Created September 24, 2014 16:13
Show Gist options
  • Save beakr/f561a9cb31934ac44776 to your computer and use it in GitHub Desktop.
Save beakr/f561a9cb31934ac44776 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include <zlib.h>
int main()
{
const char * dat = "Hello world!";
gzFile * f = (gzFile *)gzopen("archive.gz", "wb");
gzwrite(f, dat, strlen(dat));
gzclose(f);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment