Created
September 30, 2021 01:23
-
-
Save dendisuhubdy/f07923fd32f544e57887e4b8ff78b855 to your computer and use it in GitHub Desktop.
tar.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BUF_SZ 16384 | |
void my_gunzip(gzFile_s *src, FILE *dest) { | |
unsigned char buf[BUF_SZ]; | |
for (auto sz = gzread(src, buf, BUF_SZ); sz > 0; sz = gzread(src, buf, BUF_SZ) { | |
std::fwrite(buf, 1, BUF_SZ, dest); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment