You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in using this code for my project, but I am not too familiar with the 7z part of the code. I want to use this code to simply take the archive, Loop through the files and analyze them, without unzipping to the disk.
I am not 100% sure how to go about doing that with your library, and I am a bit in over my head.
looking at your code I have this:
funcmain() {
//Initialize the liblib, err:=sz.NewLib()
must(err)
deferlib.free()
//Get the file referencef, err :- os.Open("file.7z")
must(err)
//Get the file statsstats, err:=f.Stat()
must(err)
//Open the 7z fileis, err:=sz.NewInStream(f, "7z", stats.Size())
is.Stats-&sz.ReadStats{}
a, err:=lib.OpenArchive(is, true)
must(err)
//This is where my understanding gets a bit fuzzy...
After this it looks like the ecs struct above is used with the "GetStream" function, and I can see how the GetStream function extracts to a file, that makes sense. Here are my more specific questions...
is GetStream called for each item? I think it is, but I want to be sure I understand this.
if it is per item, what code would I have to write to simply open the file, so I can read it as a text or binary just like os.Open?
I would be happy to write up some examples like you have for the command line once I understand a very trivial example of opening a file found inside of the archive! Thank you for taking the time to read this!
The text was updated successfully, but these errors were encountered:
Hello,
I am interested in using this code for my project, but I am not too familiar with the 7z part of the code. I want to use this code to simply take the archive, Loop through the files and analyze them, without unzipping to the disk.
I am not 100% sure how to go about doing that with your library, and I am a bit in over my head.
looking at your code I have this:
After this it looks like the ecs struct above is used with the "GetStream" function, and I can see how the GetStream function extracts to a file, that makes sense. Here are my more specific questions...
I would be happy to write up some examples like you have for the command line once I understand a very trivial example of opening a file found inside of the archive! Thank you for taking the time to read this!
The text was updated successfully, but these errors were encountered: