aldostools / webMAN-MOD

Extended services for PS3 console (web server, ftp server, netiso, ntfs, ps3mapi, etc.)
https://aldostools.github.io/webMAN-MOD/
GNU General Public License v3.0
1.29k stars 176 forks source link

Can't extract 7z, don't know why #989

Open joey-scanga opened 9 months ago

joey-scanga commented 9 months ago

I'm trying to use the web command for unzipping a 7z file through the browser, like the one below:

/unzip.ps3/<archive-file> - decompress a zip, rar, 7z, bz2, tar or tgz in the same folder
/unzip.ps3/<archive-file>&to=<folder-path> - decompress the archive in a specific path

but when I try on the browser (through right-clicking the file and clicking "unzip"), I get a 3-dots animation on the browser, and an app called PKG Launcher is loaded in the XMB. When I try running the PKG Launcher app, it just "runs" for a few seconds and then it boots me back to the XMB.

I'm new to using webMAN-MOD. Am I doing something wrong by trying to run the PKG Launcher app? Am I missing something? I know after the description of the web commands above it says

NOTE: These commands require PKGLAUNCH installed (version 20210217 or later) and /app_home/PS3_GAME

but I don't know what having /app_home/PS3_GAME means. I see it in my file explorer so I believe I have it. Anyone know what I'm doing wrong?

aldostools commented 9 months ago

The archive feature is experimental. It relies on PKG Launcher which is the app that actually extracts the the archive.

Application uses the 7z/rar/zip libraries ported to PS3 by @bucanero

These libraries may consume a large amount of memory if the archive was compressed using a large dictionary, which is one of the main reason why it may not be working.

Also 7z and rar are compression formats with recent versions that may not be compatible with the library.

If the archive is not being extracted on the PS3, try extracting the files on the PC then transfer them to PS3 using FTP or storing them on an USB storage device.

bucanero commented 9 months ago

I remember that Managunz manager also included the libraries I ported, so that's another thing to try.

In any case, the 7z library was only tested with small files, probably not larger than 1 Mbyte. The user could check with a small 7z file first, then try other. But also some compression options might not be supported by the library itself. (like if the archive is password-protected)

bucanero commented 9 months ago

@aldostools , I was reviewing the un7zip library code, and actually the code is doing the whole file extraction in memory in a single shot. Example: if your archive has a 10 Mbyte file inside, it needs 10 Mb RAM available to unpack the file, then write the 10Mb to disk.

Simplifying things, if your 7z archive has a file over 256 Mb (max PS3 RAM) then the process will fail. (I'm sure it will fail before, but anything over 256mb is going to fail for sure, as the ps3 rans out of memory)

joey-scanga commented 9 months ago

In any case, the 7z library was only tested with small files, probably not larger than 1 Mbyte. The user could check with a small 7z file first, then try other. But also some compression options might not be supported by the library itself. (like if the archive is password-protected)

I tried earlier with a simple zipped Word file no larger than 100Kb, the decompression still didn't work (tried both through the browser and by clicking the PKG Launcher app).

aldostools commented 9 months ago

Does the 7z unzip with ManaGunZ or IRISMAN?

The 7zip allows multiple compression algorithms and settings. It think not all are supported by the library.

The feature in PKGLAUNCH is basically a PoC. I recommend that decompress the files on the PC.

joey-scanga commented 9 months ago

@aldostools I'm not sure, at work right now but I'll definitely try later tonight! Thanks for the quick replies and help