c++ - How to get the original file extension after INFLATE? -


i'm using zlib , c++ compress/decompress files.

i can deflate file , put .z extension. when inflating .z file have manually put needed extension. inflating works should , can inflate .z file stdout or file.

i 've read zlib manual couldn't manage, how solve problem. suppose need dig archive's header information?

any appreciated, thanks!

the zlib library compress , decompress both zlib , gzip streams. zlib streams have compact header , trailer no provision store file name information. gzip header , trailer on other hand can store file name, can used when decompressing. should read zlib documentation see how use gzip format, , how process gzip header.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -