Ghabry
22f028e842
Migrate to std::string_view
2025-03-02 19:38:55 +01:00
Ghabry
6df90be89a
fmt: Replace core.h with format.h
...
core.h is just a forwarder to format.h in recent version.
2024-12-24 14:17:40 +01:00
Ghabry
981ac0f92f
ZIP: Improve encoding detection by only feeding the filename to ICU
...
Before the string contained full paths, breaking the detection logic because most paths are ASCII
2024-10-09 21:46:02 +02:00
Ghabry
c409653a3e
ZipFS: Replace the scan backward for determining if it is a ZIP with a single read
...
Was the only agressive use of "end" in our code.
2024-06-04 19:04:29 +02:00
Ghabry
a2c0565995
ZipFs: Reuse the initial stream (LzhFs already does this)
2024-05-23 15:22:55 +02:00
Ghabry
87d03e9d38
ZipFS: Port some enhancements from LzhFS over
...
Fix #3094
2023-10-25 23:28:18 +02:00
Ghabry
2d87349b84
Support games in LZH archives
2023-06-12 15:49:47 +02:00
Ghabry
f592152441
Zip: Convert \ to / after conversion to Unicode
...
Shift-Jis can have bytes that map to \, corrupting the sequence
Fix #2907
2023-03-13 14:55:47 +01:00
Ghabry
2bc7bfe641
Fix -Wall -Wextra warnings
...
There is one warning left in "platform.cpp" about GetEntryType(...) where I'm not sure how to solve it.
Removing it breaks the build on platforms that do not provide d_type.
2023-03-08 18:17:27 +01:00
Ghabry
b4238007ac
ZipFS: Also determine subdirectories when files are read
...
It is not required by the ZIP standard that directory entries are created for them.
Windows Compressed Folders does this
2022-08-24 16:34:23 +02:00
Ghabry
75459319a7
ZipFS: Support archives where the size in the local file header is 0
...
Windows Compressed Folders does this.
Note that this implementation is not fully conforming.
Bit 3 of the general purpose flag is not checked.
Fix #2836
2022-08-24 16:33:30 +02:00
Ghabry
e7966889f4
Zip FS: Do not cache the decompressed data anymore.
...
We have already enough caching layers, so this just wastes RAM and makes the feature unusable on low spec devices.
2022-05-20 18:04:35 +02:00
Carsten Teibes
c288526db1
Plug memory leak in zip filesystem
2022-05-20 18:04:35 +02:00
Ghabry
c50a8e5aee
Zip FS: Support ZIP archives created by broken archivers that use \ as dir delimiter
2022-02-26 02:48:36 +01:00
Ghabry
834a07895f
Improve ZIP handling
...
1. The language flag (Bit 11) is now respected for UTF-8
This is used by all zip programs except the Windows "compressed folder"
2. All files that are not ASCII and do not have Bit 11 are considered for encoding detection
The encoding detection will be only needed for Windows "compressed folder"
3. When the file is considered for encoding it is also stored in Codepage 437
7zip uses CP437 for Western European filenames
Fix #2562
2021-07-12 19:48:17 +02:00
Ghabry
adf4a6509c
ZipFS: Create intermediate directories manually because they are not stored inside the zip
...
Fix some warnings.
2021-05-31 00:09:03 +02:00
Ghabry
bf1fc3f20b
When the filesystem only contains one folder in the root enter it directly. This auto-boots game archives of structure "archive/game".
...
Also do not return empty filename from zip folder list anymore.
2021-05-31 00:09:03 +02:00
Ghabry
16ae4ed679
Filesystem: Add more unit tests
2021-05-31 00:09:03 +02:00
Ghabry
fd30ff35e6
Refactor ZipFilesystem. Backed by a memory streambuf now (less memory efficient but easier to implement and faster IO because the decompression happens on first access.
2021-05-31 00:09:03 +02:00
Ghabry
74cead1761
Improve logging of Game and Save path (dumps the filesystem tree)
2021-05-31 00:09:03 +02:00
Ghabry
e6e0fd1ca5
Output: Fix stackoverflow when recursing
2021-05-31 00:09:03 +02:00
Ghabry
02d08257a5
Filesystem
...
- Support Save redirection when the filesystem does not support writing (useful for games in zips).
- Implement CreateDirectory for Platform / Native FS
2021-05-31 00:09:03 +02:00
Ghabry
6c301bb3ef
Filesystem: Remove the Impl-Forwarding functions. They were remaining from an previous attempt before the superior View-approach was used.
2021-05-31 00:09:03 +02:00
Ghabry
5b4a7991b6
Remove FileFinder::OpenInput/OutputStream and use the Filesystem provided classes instead.
...
Fixes file loading from ZIP.
2021-05-31 00:09:03 +02:00
Ghabry
cd58ad4301
Add Zip Filesystem. The code is old and ugly but good enough for testing the VFS.
2021-05-31 00:09:03 +02:00