Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #1428

I haved thought more, and to support the technology of Solid compression

From aminer <aminer@toto.net>
Newsgroups comp.programming, comp.programming.threads
Subject I haved thought more, and to support the technology of Solid compression
Date 2013-03-10 18:53 -0700
Organization A noiseless patient Spider
Message-ID <khj2p4$mog$1@dont-email.me> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello all,

I haved thought more, and to support the technology of Solid compression 
as we find it in 7zip and RAR, here is my algorithm steps:

The FindFile component that you find inside my zipfile, must be modified 
to return
a '*' charrater to the callaback method when there is no
file to return after the search transaction were executed.

After that, inside the following callback method inside my
Parallel archiver source code inside the zipfile, you will read this:


==
procedure TPZlibArchiver.AddFile(Sender: TObject; MyFile: string);

begin
  st2.add(MyFile);
  AddFiles(st2); // the true means update the file without asking..
  st2.clear;
end;

==

This callaback must do the work to add the files to an in-memory archive 
that will correspond to the size of the solid block ,
take for exemple that the solid block equal 64 MB, so the AddFile()
callback must add the files to an in-memory archive if the count number 
of the files is greater than 1, and of course i have to add support for
in-memory archives and that's easy to do, after that i have
to write the in-memory archive , that is our solid block,to the archive
using the AddStream() of Parallel archiver, and i have to give to it an 
extension name that ends with '.solid' and that's all for the AddFile() 
callback. And for the
the LoadIndex() method, i have to detect the files that ends with
'.solid' extension and Extract them to an in-memory stream after
that i have to load this in-memory stream that is an in-memory archive
with the LoadIndex() to fill correctly the hashtable with the  key file
names, and after that i have to load those key file names of every
solid block that ends with 'solid' to the hashtable of the archive
and load also there corresponding file positions that is the
position of the solid block and after that i have to free the in-memory 
archive. And that's all for the LoadIndex(). And for the Extract() 
method , if i want
to extract the files that are inside a solid block , i have only to
look for there file positions inside the hashtable, and uncompress
the solid block into an in-memory archive and after that extract the
files that we want to extract. This  was my algorithm to support the
solid compression technology, and the same algorithm will apply to
bigger solid blocks that are extracted to file streams.

So, as soon i have sometime, i will implement my method to support
solid compression technology into my Parallel archiver,  as we find it 
in 7zip and RAR. Actually my Parallel archiver supports only solid 
compression like the tar.bz2




Thank you,
Amine Moulay Ramdane



Back to comp.programming.threads | Previous | Next | Find similar


Thread

I haved thought more, and to support the technology of Solid compression aminer <aminer@toto.net> - 2013-03-10 18:53 -0700

csiph-web