Commit graph

65 commits

Author SHA1 Message Date
Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Vladimir Serbinenko
2b9244c2de COMMON: Switch unzip to MemcachingCaseInsensitiveArchive 2022-12-01 01:52:46 +01:00
Eugene Sandulenko
b114b95643
JANITORIAL: Fix code formatting 2022-11-30 00:35:59 +01:00
Vladimir Serbinenko
aae70a0b11 COMMON: Fix new[]-free mismatch in unzip.cpp 2022-11-30 00:17:51 +01:00
Vladimir Serbinenko
05f1a0df51 COMMON: Remove the need for most reflecting when initing reflected table
Instead reflect the polynomial and change the shifts. Also removes the
need for explicit init.

This makes our crc more similar to its standard implementation
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
ec9bb100e1 COMMON: Switch unzip from zlib to gzio
Tested by loading scummremastered.zip
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
b63160a06e COMMON: Remove unused functions in unzip 2022-11-29 01:05:31 +01:00
Donovan Watteau
27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Eugene Sandulenko
5e05f93f36
ALL: Remove Symbian port 2022-05-28 12:32:29 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
7adcd48a41 COMMON: Use override
Using clang-tidy modernize-use-override
2021-11-14 14:35:15 +02:00
djsrv
7eb4841065 ALL: Use Path type in Archive functions 2021-08-07 10:44:37 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Bastien Bouclet
955e18c648 COMMON: Use nullptr instead of NULL or 0 where appropriate 2018-05-10 08:35:46 +02:00
Adrian Frühwirth
9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00
Filippos Karapetis
bb120d0fd4 COMMON: Disable unused string 2014-12-07 17:49:55 +02:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Johannes Schickel
b4d0a8ba66 JANITORIAL: Enforce "} // End of namespace" with a single space after }. 2013-01-26 19:38:02 +01:00
Johannes Schickel
f23ca8b62b COMMON: Use the file cache in ZipArchive::listMembers for performance.
This avoids a new iteration through the .zip file for every listMember call.
Instead it uses the "_hash" HashMap, which already contains all the filenames
and is filled on initializing the ZipArchive by unzOpen.
2012-04-30 00:09:56 +02:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Andrea Corna
a6ec4f70da COMMON: Make more members of Archive constant. 2011-12-13 17:55:57 +01:00
Christoph Mallon
84220d2ca0 COMMON: Remove superfluous Common:: qualifiers. 2011-08-07 15:19:07 +02:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel
c0bd496c90 COMMON: Fix compilation when zlib support is enabled. 2011-05-02 17:19:35 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Littleboy
55650f364c COMMON: Add proper error handling to the ZipArchive class
- Add check in listMembers and skip files that can't be enumerated.
 - Add checks for all function calls in createReadStreamForMember (and no longer return a stream from an uninitialized buffer when the file cannot be read).
2011-04-25 07:20:16 -04:00
Ori Avtalion
3354204f53 JANITORIAL: Remove extraneous parentheses
svn-id: r55890
2011-02-12 10:36:35 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
c975ed11a1 ALL: Fix various typos (patch #3093266)
svn-id: r53762
2010-10-24 13:04:33 +00:00
Jordi Vilalta Prat
8388e0dfea JANITORAL: Clean trailing whitespaces.
svn-id: r53160
2010-10-12 02:18:11 +00:00
Eugene Sandulenko
2bd5077d2e COMMON: Add caching to ZipArchive. Patch #3048388
Based on patch #3048388: "Hash map for ZipArchive class", though
I made the hashing by default and removed the old code.

It is a really good thing and will speed up any archive operations.

svn-id: r52204
2010-08-19 10:15:12 +00:00
Robert Špalek
02fb3f88e2 unzip.cpp can read uncompressed ZIP archives even when zlib is not linked in
svn-id: r50482
2010-06-29 06:33:31 +00:00
Johannes Schickel
d0c79d21e9 Fix file length of zip file members inside ZipArchive (thanks to fuzzie for reporting).
svn-id: r49321
2010-05-30 12:44:59 +00:00
Fabio Battaglia
23cf40db2b Add a comment to document my removal of stream delete in previous commit
svn-id: r48155
2010-02-28 14:40:40 +00:00
Fabio Battaglia
d1e7fcbe75 do not delete the stream twice in makeZipArchive as it's already deleted by unzOpen if a problem is encountered
svn-id: r48154
2010-02-28 14:33:22 +00:00
Max Horn
8ac5d00d57 Hide ZipArchive implementation, only expose it via factory functions: makeZipArchive()
svn-id: r48040
2010-02-13 11:56:30 +00:00
Max Horn
2bbf708dea Introduced new type Common::DisposeAfterUse::Flag
svn-id: r45233
2009-10-18 19:41:59 +00:00
Max Horn
65b5d31814 COMMON: Removed Stream::ioFailed() and clearIOFailed(), as they are deprecated; however, retained ioFailed in SeekableReadStream and File for now (so for now this mainly affects WriteStream subclasses)
svn-id: r40725
2009-05-19 11:42:14 +00:00
Max Horn
c397b37bfb Modified ZipArchive::createReadStreamForMember to check whether the zip archive contains a file with the given name
svn-id: r38786
2009-02-22 16:27:48 +00:00
Max Horn
14c5bbbccf Renamed Archive::openFile to createReadStreamForMember
svn-id: r36021
2009-01-23 04:45:44 +00:00
Max Horn
9861afd8fd Renamed ArchiveMember::open -> createReadStream, and made it a cv member (const); same for Archive::openFile
svn-id: r36020
2009-01-23 04:36:18 +00:00
Max Horn
8f16458e9b Renamed FSNode::openForReading / openForWriting to createReadStream / createWriteStream, again to make ownership of the returned stream clear
svn-id: r36014
2009-01-23 03:41:36 +00:00
Eugene Sandulenko
696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Max Horn
b3e72347a3 Improved ZipArchive to take arbitrary SeekableReadStream; also, the variant which is inited using a filename now uses SearchMan to lookup the filename's file
svn-id: r34899
2008-11-04 20:04:25 +00:00
Johannes Schickel
282ebbb0e5 Commit of patch #2207782 "ARCHIVE: New method 'getMember'".
svn-id: r34871
2008-11-01 12:49:29 +00:00
Vicent Marti
bb619b4578 - Fixed theme loading from Zip files.
- Changed Common::ZipArchive to use FSNodes instead of full paths (external API unchanged).

svn-id: r34761
2008-10-09 17:56:07 +00:00
Johannes Schickel
e417471177 Committed slightly modified patch #2034983 "Case-insensitivy and directory handling for engines".
svn-id: r34734
2008-10-03 16:57:40 +00:00
Max Horn
c7fde102e3 Renamed FilesystemNode -> FSNode
svn-id: r34716
2008-10-02 16:58:59 +00:00
Vicent Marti
87917e06d9 Fixed functionality of ZipArchive::getAllNames(). Now it expects a possibly non-empty string list and returns the amount of new filenames added to it.
svn-id: r34698
2008-09-30 11:53:37 +00:00