https://github.com/bucanero/libtinytar
A library that provides .tar, .tar.gz, and .tar.bz2 archive creation and extraction to the PS3
https://github.com/bucanero/libtinytar
bz2 bzip2 compression-library extracts-contents gzip tar untar
Last synced: about 1 year ago
JSON representation
A library that provides .tar, .tar.gz, and .tar.bz2 archive creation and extraction to the PS3
- Host: GitHub
- URL: https://github.com/bucanero/libtinytar
- Owner: bucanero
- License: mit
- Created: 2020-08-06T17:46:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-24T16:31:21.000Z (over 4 years ago)
- Last Synced: 2025-03-30T22:25:33.910Z (about 1 year ago)
- Topics: bz2, bzip2, compression-library, extracts-contents, gzip, tar, untar
- Language: C
- Homepage: http://www.bucanero.com.ar/
- Size: 98.6 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tinytar library
This library provides `.tar`, `.tar.gz` (GZip), and `.tar.bz2` (BZip2) archive handling, creation, and extraction to the PlayStation 3 using the [PSL1GHT SDK](https://github.com/ps3dev/PSL1GHT/).
## Features
- Extract contents from `.tar`, `.tar.gz`, and `.tar.bz2` files
- Create `.tar`, `.tar.gz`, and `.tar.bz2` archives
### Source Version
- libbzip2 [1.0.6](https://github.com/bucanero/psl1ght-libs/tree/master/bzip2)
- based on [untar.c](https://github.com/libarchive/libarchive/blob/master/contrib/untar.c)
- based on [tarball.cpp](https://github.com/lindenb/cclindenb/blob/master/src/core/lindenb/io/tarball.cpp)
## Exports
### `tar` Creation
- tar(): creates a `.tar` uncompressed archive
```c
int tar(const char* dstFile, const char* srcPath);
int tarEx(const char* dstFile, const char* srcPath, tar_callback_t callback);
```
- tar_gz(): creates a `.tar.gz` (GZip) compressed archive
```c
int tar_gz(const char* dstFile, const char* srcPath);
int tarEx_gz(const char* dstFile, const char* srcPath, tar_callback_t callback);
```
- tar_bz2(): creates a `.tar.bz2` (BZip2) compressed archive
```c
int tar_bz2(const char* dstFile, const char* srcPath);
int tarEx_bz2(const char* dstFile, const char* srcPath, tar_callback_t callback);
```
### `tar` Extraction
- untar(): extracts contents from a `.tar` uncompressed archive
```c
int untar(const char* srcFile, const char* dstPath);
int untarEx(const char* srcFile, const char* dstPath, tar_callback_t callback);
```
- untar_gz(): extracts contents from a `.tar.gz` (GZip) compressed archive
```c
int untar_gz(const char* srcFile, const char* dstPath);
int untarEx_gz(const char* srcFile, const char* dstPath, tar_callback_t callback);
```
- untar_bz2(): extracts contents from a `.tar.bz2` (BZip2) compressed archive
```c
int untar_bz2(const char* srcFile, const char* dstPath);
int untarEx_bz2(const char* srcFile, const char* dstPath, tar_callback_t callback);
```
## Build/Install
Build the library with:
```
make
```
Install the library to your PSL1GHT setup with:
```
make install
```
## Documentation
- [BZip2 manual](https://github.com/bucanero/psl1ght-libs/blob/master/bzip2/manual.pdf)
## Sample app
You can find a sample PSL1GHT app using the library [here](./example).
## License
`libuntar` is released under the [MIT License](./LICENSE).