Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sagebind/respk
Manage resource files using a fast, custom open format designed especially for use in games.
https://github.com/sagebind/respk
archiving game-development resource-loader
Last synced: 29 days ago
JSON representation
Manage resource files using a fast, custom open format designed especially for use in games.
- Host: GitHub
- URL: https://github.com/sagebind/respk
- Owner: sagebind
- License: mit
- Created: 2017-04-06T05:06:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T11:58:08.000Z (over 1 year ago)
- Last Synced: 2024-10-05T16:37:05.184Z (about 1 month ago)
- Topics: archiving, game-development, resource-loader
- Language: Rust
- Homepage:
- Size: 41 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ResPK
ResPK is a fast and open SQLite-based archive format specifically designed for storing game resources.[![Crates.io](https://img.shields.io/crates/v/respk.svg)](https://crates.io/crates/respk)
[![Documentation](https://docs.rs/respk/badge.svg)](https://docs.rs/respk)
![License](https://img.shields.io/badge/license-MIT-blue.svg)## Overview
ResPK (Resource PacKage) is an archive format designed for bundling game resources, such as data files, images, sounds, music, and videos together into fewer larger files. Bundling resources together can improve performance and also makes it easier to do distribution and patching.
The file format is simply a [SQLite] database file with a particular schema. SQLite works well in this situation, as it is an open format that can be easily viewed with many tools, offers high performance for random row access, and allows concurrent reads. Being just a SQLite database also allows you to add any custom extra data or metadata you might need into your own ResPK archives while maintaining compatibility.
All resources are compressed individually using the fantastic [LZ4] compression algorithm, which offers a decent amount of compression at blazing fast speed. While not as space-efficient as ZLIB or LZMA, the speed of LZ4 actually outweighs the speed of reading from most storage devices, which means it is actually _faster_ to read a LZ4-compressed file from disk than an uncompressed file due to the reduced reads.
## Features
- **Fast random access:** Designed from the get-go to give really fast read times and random access.
- **Compression:** Provides per-file compression to reduce overall file size and also to improve speed.
- **Streaming:** Resources can be read incrementally from disk using on-the-fly decompression.
- **Lightweight:** The library contains minimal dependencies to keep it lightweight.## Installation
Add this to your `Cargo.toml` file:
```rust
[dependencies]
respk = "0.1"
```## License
Available under the MIT license. See the [LICENSE](LICENSE) file for more info.
[LZ4]: https://github.com/lz4/lz4
[SQLite]: https://sqlite.org