Thanks, I will check it out.

In meanwhile I've figured out how to use zipfiles. Just had to add: {.passl: 
"-lz".}

I've downloaded precompiled zlib binaries because zlib.dll supplied with Nim is 
32 bit for some reason.

Also, right away I've found some problem in libzip.nim, it produced IO error 
while extracting whole archive:
    
    
     extractAll*(z: var ZipArchive, dest: string) =
      ## extracts all files from archive `z` to the destination directory.
      createDir(dest)
      for file in walkFiles(z):
        if file.contains("/"):
          createDir(dest / file[0..file.rfind("/")])
        extractFile(z, file, dest / file)

so I've changed it to:
    
    
     extractAll*(z: var ZipArchive, dest: string) =
      ## extracts all files from archive `z` to the destination directory.
      createDir(dest)
      for file in walkFiles(z):
        if file.endsWith("/"):
          createDir(dest / file[0..file.rfind("/")])
        else:
          extractFile(z, file, os.unixToNativePath(dest / file))

Need to test other parts as well 

Now, I will look for a way to statically link zlib, but I'm really new to all 
this stuff with compiling/linking C/C++/GCC.

Reply via email to