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

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

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

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