Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613702
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:09:27+00:00 2026-05-18T22:09:27+00:00

Cursory Google search didn’t return anything simple enough to understand (i’m pretty new to

  • 0

Cursory Google search didn’t return anything simple enough to understand (i’m pretty new to functional programming).

if I have an array of files, how can i zip each file and then create a zip of all zipped files?

I have something like this so far:

let zip f = 
    f.zip //this is where I need the most direction

let zipAllAttachments f =
    f
    |> Seq.map zip   //do I need to create another function to create a single zip of all zips?

EDIT: this is what I have so far, but I’m getting some strange behavior. More to come once I figure out what the strange behavior IS exactly:

use zipfile = new ZipFile()
for fileObj in files do
    zipfile.AddFile(sprintf "%s%s" path  fileObj.Filename) |> ignore
    zipfile.Save("C:\\temp\\Compliance.zip")

UPDATE: I don’t think the “strange behavior” is related to the zip module. I appreciate all the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:09:27+00:00Added an answer on May 18, 2026 at 10:09 pm

    Are you trying to create an independent implementation of zip compression?

    I’d use DotNetZip from http://dotnetzip.codeplex.com/ — it’s a single, managed code (C#) assembly. Using it from F# should be pretty much as simple as referencing the assembly from your project.

    Usage is simple. For C#:

    using (ZipFile zip = new ZipFile())
    {
      // add this map file into the "images" directory in the zip archive
      zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
      // add the report into a different directory in the archive
      zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
      zip.AddFile("ReadMe.txt");
      zip.Save("MyZipFile.zip");
    }
    

    If you want to zip a collection of zip files (why?), there’s a number of ways to do that with DotNetZip (you can, for instance, save your zip file to a stream, or add a stream to a zip file).

    Hope this helps!


    Edited To Note: DotNetZip used to live at Codeplex. Codeplex has been shut down. The old archive is still [available at Codeplex][1]. It looks like the code has migrated to Github:

    • https://github.com/DinoChiesa/DotNetZip. Looks to be the original author’s repo.
    • https://github.com/haf/DotNetZip.Semverd. This looks to be the currently maintained version. It’s also packaged up an available via Nuget at https://www.nuget.org/packages/DotNetZip/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a Google API to return some JSON, which i have converted to
It looks like quite a cool idea, but a cursory google search finds nothing
I have problem with CSS <buttons> in Google Chrome, it shows space between <buttons>
I'm trying to use Google's AJAX (JSON) Web Search API in Python. I'm stuck
I'm currently working on a Google Maps project and am implementing a search function.
I thought this would be easy to find, but a google search has been
maybe some one can help me with this... I have a custom search button
I want to have a custom cursor while moused over the Google Maps component
I'm currently trying to implement a Search in my App. I followed Google's Tutorial
I have written an extension for google chrome and I have a bug I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.