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 9320167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:34:08+00:00 2026-06-19T03:34:08+00:00

I am using libzip in order to move files in a zip from another

  • 0

I am using libzip in order to move files in a zip from another zip. So firstly I use zip_source_zip to create a zip_source from a file in my zip, and then zip_add to finally add the file to the zip.

But there is an argument that I don’t understand what it stands for. The first argument of zip_source_zip. Here is its prototype:

struct zip_source * zip_source_zip(struct zip *archive, struct zip *srcarchive, zip_uint64_t srcidx, int flags, zip_uint64_t start, zip_int64_t len)

srcarchive is the zip where I take my file, srcidx is the position in the zip of the file that I want, flags are flags :P, start is the first byte where I want to take the file and len is the number of bytes from start.

But I don’t understand what the first argument archive stands for. I put the pointer of the destination zip but it didn’t work.

Do you know what this first argument stands for? Thank you!

PS: Here is the page where the function is described: http://www.nih.at/libzip/zip_source_zip.html

  • 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-06-19T03:34:09+00:00Added an answer on June 19, 2026 at 3:34 am

    Each zip_source should be associated with a ZIP archive that it will operate on (for example, the zip_add() function can be used to add the contents of the source to that particular zip archive). It doesn’t matter whether you create the zip_source from a memory buffer (using zip_source_buffer()), from another ZIP archive opened for reading (what you are doing) or using any other method. Basically, the first ZIP archive is the target that will be modified when adding the contents of the zip_source object, and the second ZIP archive argument is the one of which the contents are copied to the source.

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

Sidebar

Related Questions

Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
I using libzip to work with zip files and everything goes fine, until i
Using jQuery, how do I get the value from a textbox and then load
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
Using 2 dropDownLists in repeater row how does one use the 1st one as
I've inherited a project that at some point creates a zip file, adds an
Using the following database table structure: Order Table: OrderId OrderName OrderItem Table: OrderId ItemId
Using intellij and maven pom files, how do i debug tests run inside the
using grep, vim's grep, or another unix shell command, I'd like to find the
Using Android NDK is it possible (from native C-code) to get a list of

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.