What am I doing wrong? Trying to use std/zip, and zlib1.dll is required. When I put zlib1.dll and my exe in the same place and run, I get
could not load: zlib1.dll
(bad format; library may be wrong architecture)
What gives? Win11 64-bit. Compiled exe w/ --cc:vcc.
Strange error, Nim ships 64 bit dlls. I had other strange errors with zlib1.dll in the past...
Maybe give https://github.com/guzba/zippy a try? (It beats zlib in most case). It's in pure Nim and requires no dlls.
If you have a .gz file: uncompress(readFile(path)) will detect gzip and work (see https://github.com/guzba/zippy/blob/master/tests/test.nim#L4).
If you have a tar.gz, you can use extractAll from zippy/tarballs.
Currently this just tarball extractAll writes to disk though, if you just want something in memory you'll want to try https://github.com/guzba/zippy/blob/master/src/zippy/tarballs_v1.nim (which is legacy and I don't love the approach anymore, but it was working).