[physfs] 7z Archiver updated / LZMA SDK 4.57

Dennis Schridde devurandom at gmx.net
Sat Dec 22 09:06:30 EST 2007


Am Samstag, 22. Dezember 2007 01:34:03 schrieb Dennis Schridde:
> Am Mittwoch, 19. Dezember 2007 00:31:06 schrieb Dennis Schridde:
> > Hi!
> >
> > I included the lzma sdk 4.57 (it still has the nasty disrespect for
> > _SZ_ONE_DIRECTORY and also still has the hardcoded X86 functions) and
> > therefore changed the directory structure to match.
> > - I included all files of the C implementation. This includes the example
> > file and several files which are apparently not needed. It eased the
> > update a bit, since lots of functionality was moved around... Maybe they
> > are helpful later? (If this is a problem, I can of course remove the
> > unnecessary things.) - I also included the docs, which were present in
> > the root dir of the sdk. They were moved to the doc/ subdir. Certainly
> > helpful in case someone wants to work on the archiver...
> >
> > The only incompatibilty between 4.43 and 4.57 is InitCrcTable, which is
> > now called CrcGenerateTable. (archiver/lzma.c:~447)
> >
> >
> > I also updated the archiver, though that is still not entirely finished.
> > - It finally supports last-modification-time. (Thanks to the new SDK.
> > They use Microsoft FILETIME, which counts nanoseconds since
> > 01.01.1601...) - I don't use linked lists anymore for 7z files. Instead
> > they are simple arrays. They are now sorted, too.
> > - In regards to intialisation I moved closer to the zip implementation.
> > (Initialisation of files was moved from openRead to openArchive.)
> > - Enumeration was completely overhauled. It is now very much more
> > straight-forward. (Eg. by gaining some advantage from the fact that
> > directories are handled like files by 7z.)
> > - Several cleanups, renames, simplifications.
> >
> > What I still need to do:
> > - Gain advantage from the sorted file list. Finding an entry is now
> > centralised in lzma_find_file, which could obviously be a little bit more
> > clever than traversing the whole list...
> > - Improved comments...
>
> Fixed these two.
> I now use the C89 stdlib function bsearch(), but I'd recommend implementing
> __PHYSFS_search for consistency reasons.
> Comments are hopefully enough, push me if something is missing/unclear.
>
> Only attached the archiver again.
> (When you apply the sdk patch, don't forget that there were a lot of files
> moved/added. If it is more convenient, I can also write you a script which
> does the moving and copies the new files over, or something...)
Another update, but this one it should be final.

Archiver:
- Made the read-implementation for 7z thread-safe in _LZMA_IN_CB mode by 
storing the buffer in the FileInputStream (new name!). This requires a hacky 
guessing of the FileInputStream pointer via offsetof(), since I can only pass 
a ISzInStream through 7z, which has no room for userdata...

SDK:
- Do not anymore use _LZMA_IN_CB by default, since it probably doesn't bring 
much benefit as I use 7z to decompress whole folders at once anyway.

--Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lzma457archiver.3.patch
Type: text/x-diff
Size: 30162 bytes
Desc: not available
URL: <http://icculus.org/pipermail/physfs/attachments/20071222/21775479/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lzma457sdk.2.patch
Type: text/x-diff
Size: 358425 bytes
Desc: not available
URL: <http://icculus.org/pipermail/physfs/attachments/20071222/21775479/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://icculus.org/pipermail/physfs/attachments/20071222/21775479/attachment.pgp>


More information about the physfs mailing list