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

  • Home
  • SEARCH
  • 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 6367095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:30:21+00:00 2026-05-25T00:30:21+00:00

The archives I’m having trouble with were all created by merging a working archive

  • 0

The archives I’m having trouble with were all created by merging a working archive with a non-existant archive, thereby effectively copying the contents of one into the other. It’s part of a merging process we do. Like this…

ZipDestination := TZipForge.Create(nil);
if FileExists(DestinationZipFileName) then
  ZipDestination.OpenArchive(fmOpenReadWrite + fmShareDenyWrite)
else
  ZipDestination.OpenArchive(fmCreate);

ZipDestination.Zip64Mode := zmAuto;
ZipDestination.MergeWith(SourceZipFileName);
ZipDestination.CloseArchive;

and this is the code that gets a blob from the archive, uncompresses it, and makes it ready for the viewer.

CompressedStream := TMemoryStream.Create;
UnCompressedStream := TMemoryStream.Create;
GetCompressedStream(CompressedStream);  // this fetches the blob from the zipfile
ZipForge.InMemory := True;
// Native Error 00035 on next line (sometimes)
ZipForge.OpenArchive(CompressedStream, False);  
ZipForge.FindFirst('*.*', ArchiveItem, faAnyFile - faDirectory);
sZipFileName := ArchiveItem.FileName;
sZipPath := ArchiveItem.StoredPath;
ZipForge.ExtractToStream(sZipPath + sZipFileName, UnCompressedStream);
ZipForge.CloseArchive;

but I’m encountering “Native error 00035” sometimes.

Now the strange thing is that I’m getting these errors when I try to view the first blob within the merged archive (ie. trying to view other blobs within the merged archive doesn’t raise any exception)

It could be something about ZipForge.MergeWith that I haven’t catered for, or it could be a bug in my GetCompressedStream (but if I switch the order of blobs within the archive, it always happens to the first one only). Look like it’s time for a test project to see what’s really going on.

EDIT

Original question was simply asking for guidance on these Native Errors, for which I’m satisfied with the answer I’ve chosen. As for my problem, well I’m convinced it’s an issue with the CompressedStream I’m passing into OpenArchive.

  • 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-25T00:30:22+00:00Added an answer on May 25, 2026 at 12:30 am

    Native error 00035 is “Invalid archive file”. It occurs when ZipForge can’t find either the local or central directory headers (that is, when you try to open a file that isn’t a zip).

    I don’t think they’re documented in the help, but the translation tables for native error to error code occur in ZFConst.pas. There’s a NativeToErrorCode table that converts from the “native” error into an index in the error string array. If that isn’t enough to tell you what the problem is just look through ZipForge.pas for the error code in a raise statement. They consistently use the full 5-digit code, so you can search for 00035 instead of just 35 to avoid spurious results.

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

Sidebar

Related Questions

I'm extracting files from zip and rar archives into raw buffers. I created the
I need to get archives of one author and exlude all others, Wordpress wp
I need a library to list files in archives and to extract archive files.
I need to extract all the multi-part ZIP and RAR archives in a given
Archive manager + nautilus is very usefull thing for any work with archives If
It appears that most SWF files, if not all are actually swf archives containing
Re: http://www.codinghorror.com/blog/archives/000633.html Is there a plugin that turns VS2008's non-standard regex find/replace into a
I am building a system for distributing packages (.zip archives) created by different organizations.
The archives tab in my Xcode 4.3 organizer stopped functioning all of sudden. When
Possible Duplicate: How to pack multiple library archives (.a) into one archive file? 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.