GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lambda-vn/renzip: Desktop archive manager for Ren'Py .rpa files. Browse, preview, extract, and create Ren'Py archives with a simple graphical interface.

BranchesTags
Open more actions menu

Latest commit

 

History

78 Commits
78 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
crates/renzip-core
crates/renzip-core
 
 
docs
docs
 
 
scripts
scripts
 
 
src-tauri
src-tauri
 
 
src
src
 
 
tests/fixtures
tests/fixtures
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
COMMIT_CONVENTION.md
COMMIT_CONVENTION.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
README_FR.md
README_FR.md
 
 
SECURITY.md
SECURITY.md
 
 
index.html
index.html
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
svelte.config.js
svelte.config.js
 
 
tsconfig.json
tsconfig.json
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

RenZip

Latest release CI Build License: CeCILL-2.1 Rust + Tauri 2 Platforms: Windows, macOS, Linux

Desktop archive manager for Ren'Py .rpa files, in the spirit of 7-Zip or WinRAR but dedicated to the format visual novels ship their assets in. Open an archive, see what is inside, extract all of it or three files out of it, and pack a folder back into one. No command line, no Python script, no .bat downloaded from a forum.

Read this in French: README_FR.md.

Features

  • Open an archive by picking it, or by dropping it on the window.
  • One tree for the whole archive: folders unfold in place, a tick box on any row builds the selection, and ticking a folder takes everything below it. The list is virtualised, so fifty thousand entries scroll like ten.
  • Search that keeps the full path of what it matched, so a hit three folders down is still readable as such.
  • Preview of text entries and of the usual image formats, straight from the archive, without extracting anything first.
  • Row menu: extract this, copy the entry name, open a temporary copy with whatever the desktop opens that kind of file with.
  • Extract a selection or the whole archive, keeping the archive folders or flattening everything side by side, with an honest progress bar and a cancel button.
  • Build a new archive from a folder, dropping any file or subfolder you do not want in it, and optionally reopening the result to check it against what was packed.
  • French and English interface, chosen in the settings, guessed from the desktop on first launch. Light and dark themes.
  • Keyboard-operable throughout, following the ARIA tree pattern: arrows walk and unfold, space ticks, Enter opens.

Format support

An .rpa is a container, not a compressor: only its index is compressed, the file data is stored as is. Selective extraction is therefore a seek and a read, which is what makes a preview of one entry inside a four gigabyte archive instant.

Version Read Write Note
RPA-1.0 yes no Index sits in a sibling .rpi file
RPA-2.0 yes yes Plain offsets and lengths
RPA-3.0 yes yes Offsets and lengths obfuscated by XOR with a key
RPA-3.2 yes no One extra header field before the key
RPA-4.0 yes no Same structure as 3.0, only the marker differs

Neither 3.2 nor 4.0 is offered as a write target, although their headers are understood well enough to write them. No standard Ren'Py build reads either: a game that opens one embeds a modified loader, and writing an archive the engine itself cannot read would be worse than refusing.

The format itself, how each Ren'Py release reads and writes it, where each of those facts was checked, and the sources behind the 3.2 and 4.0 headers are written down in docs/rpa-format.md.

Two things the format simply does not hold, and that the window therefore does not show: a checksum and a modification date. Nor a compressed size, since nothing is compressed.

Stack

Rust / Tauri 2 / Svelte 5 / TypeScript / Tailwind 4.

The reader and writer live in renzip-core, a plain Rust library with no Tauri dependency at all. That is a hard rule: it keeps the format work testable without opening a window, and leaves the door open for a command line binary later.

Requirements

  • Rust stable, 1.88 or newer, the oldest release every dependency accepts.
  • Node 20 or newer.
  • The Tauri system dependencies for your platform, listed in the Tauri prerequisites. On Debian and Ubuntu that is WebKitGTK and a handful of development packages; on Windows, WebView2, which Windows 11 already has.
  • Python 3, only to regenerate the test fixtures and the icon. Nothing in the build or in the application needs it.

Installation

git clone https://github.com/lambda-vn/renzip.git
cd renzip
npm install

Running

npm run tauri dev

Vite serves the frontend and Tauri opens the window on it. Drop an .rpa on that window, or use the button.

Development

After every change, all four checks must pass, in the order the CI plays them:

cargo fmt --all -- --check
cargo clippy --all-targets --workspace -- -D warnings
cargo test --workspace
npm run build

npm run build is not only a build: it runs svelte-check first, which is the type checker and the accessibility linter of the frontend.

pre-commit install wires the same checks except the tests, plus the commit message hook.

Tests

Unit tests beside the code, integration tests in crates/renzip-core/tests/. Two of them matter more than the rest:

  • read_fixtures.rs opens every archive in tests/fixtures/ and compares what comes out against expected.json, which was produced by a Python script reading the same archives the way Ren'Py does, not by this code.
  • roundtrip.rs packs a directory, opens the result, extracts it, and checks the files are identical byte for byte. That is the test that catches a mistake in the prefix handling or in a bound.

The fixtures cover an RPA-2.0, an RPA-3.0, an RPA-3.2, an RPA-4.0, a legacy 1.0 archive with files split into several blocks, an archive written the way Ren'Py's own archiver does, one written by that archiver itself under the Python 2 of a Ren'Py 6.18 SDK, one whose entries carry a prefix, an empty one, a truncated one, one declaring bytes past the end of the file, one whose entries concatenate several segments, one with a segment no reader can make sense of either, and one full of hostile paths.

cargo test --workspace
python scripts/make_fixtures.py           # rewrite tests/fixtures/
python scripts/read_archive.py x.rpa      # read an archive with pickle, as Ren'Py does

Building a desktop binary

npm run tauri build

Builds for the system it runs on: Tauri links against the native webview, so nothing cross-compiles between the three platforms. All three are built by the Build workflow, one runner each, and macOS as a universal bundle. Binaries are unsigned, so SmartScreen and Gatekeeper will warn.

Project layout

crates/renzip-core/    The format, with no Tauri dependency
  src/header.rs        Version detection and header parsing
  src/index.rs         zlib and pickle, both ways
  src/archive.rs       Opening, listing, reading, extracting
  src/builder.rs       Scanning a directory and writing an archive
  src/path.rs          Entry path sanitizing and containment
  src/error.rs         Errors that stop an operation
  src/reason.rs        Why an entry is skipped or refused
  tests/               Fixture reading and the roundtrip test
src-tauri/             Commands, window, progress events
  src/error.rs         What a failed command returns to the window
  src/desktop.rs       Handing a file to the desktop, per platform
  src/preview.rs       Deciding what to show for an entry
  src/state.rs         Open archives and their scratch directories
src/                   Svelte 5 frontend
  lib/EntryTree.svelte The one list of the main window
  lib/VirtualList.svelte  Hand-written virtualisation, no dependency
  lib/i18n.svelte.ts   French and English
docs/                  The format, and where each fact was checked
scripts/               Fixtures, icon, commit message hook
tests/fixtures/        Archives to read, and what they must produce

Security

A .rpa is a file of unknown origin, and this application treats it as hostile. The short version:

  • The index is a Python pickle. Parsed by serde-pickle, which reads values and never constructs an object the stream asks for, and accepted only in the one shape the format defines. A pass over its opcodes runs first and refuses a container fetched back from the pickle's memo or nested more than 16 levels deep, so a few kilobytes of index can neither multiply into gigabytes nor overflow the stack.
  • Entry paths are sanitised, then the destination is checked on the canonical path just before writing. A refused entry is reported and skipped, never fatal to the rest of the extraction. On Windows and macOS, two entries whose paths differ only by case are reported instead of one overwriting the other.
  • Offsets and lengths are validated against the real file size before anything is allocated, and an entry whose segments add up to more than the archive itself holds is refused. Nothing loads an archive whole, and a length the index announces is only ever a capped hint for a buffer.
  • Opening an entry never runs it without a warning. On Windows the temporary copy is marked as downloaded from the internet, so Windows prompts before running it; on Linux and macOS, scripts, launchers and programs are shown in their folder instead of being opened.
  • The window has no command that takes a path and opens it.
  • renzip-core forbids unsafe code. The application crate denies it too, except for the two calls into the Windows shell that hand a file to the desktop.
  • cargo audit checks the dependency tree. The CI job that ran it on every push is currently disabled: run cargo audit locally before a release.

The full policy, and what is deliberately outside it, is in SECURITY.md.

Commits

Conventional Commits, validated by pre-commit. See COMMIT_CONVENTION.md for types, scopes, and examples.

License

Licensed under the CeCILL Free Software License Agreement v2.1, a French open source license compatible with the GNU GPL. See LICENSE.md.

Disclaimer

RenZip is not affiliated with, endorsed by, or sponsored by Ren'Py. The name is used only to designate the engine whose archive format this tool reads and writes. RenZip does not decompile .rpyc bytecode, and extracting an archive does not give you the right to redistribute what is inside it.

About

Desktop archive manager for Ren'Py .rpa files. Browse, preview, extract, and create Ren'Py archives with a simple graphical interface.

Topics

archive-managerarchive-toolgame-moddinggame-modding-toolgame-toolsrenpyrenpy-toolsrparusttaurivisual-novel

Resources

Readme
License

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.