All Projects → junrar → Junrar

junrar / Junrar

Licence: other
Plain Java unrar library

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Junrar

box
Box - Open Standard Archive Format, a zip killer.
Stars: ✭ 38 (-73.24%)
Mutual labels:  compression, archive
ZRA
ZStandard Random Access (ZRA) allows random access inside an archive compressed using ZStandard
Stars: ✭ 21 (-85.21%)
Mutual labels:  compression, archive
Libzip
A C library for reading, creating, and modifying zip archives.
Stars: ✭ 379 (+166.9%)
Mutual labels:  archive, compression
go7z
A native Go 7z archive reader.
Stars: ✭ 46 (-67.61%)
Mutual labels:  compression, archive
Zipper
🗳A library to create, read and modify ZIP archive files, written in Swift.
Stars: ✭ 38 (-73.24%)
Mutual labels:  archive, compression
Razzle Material Ui Styled Example
Razzle Material-UI example with Styled Components using Express with compression
Stars: ✭ 117 (-17.61%)
Mutual labels:  compression
Minify
CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.
Stars: ✭ 1,710 (+1104.23%)
Mutual labels:  compression
Gzip
💾 Golang gzip middleware for Gin and net/http | Golang gzip中间件,支持Gin和net/http,开箱即用同时可定制
Stars: ✭ 113 (-20.42%)
Mutual labels:  compression
Optimus
Image conversion and optimization desktop app.
Stars: ✭ 111 (-21.83%)
Mutual labels:  compression
Zipstorer
A Pure C# Class to Store Files in Zip
Stars: ✭ 139 (-2.11%)
Mutual labels:  compression
Gtz
A high performance and compression ratio compressor for genomic data, powered by GTXLab of Genetalks.
Stars: ✭ 137 (-3.52%)
Mutual labels:  compression
Lerc
Limited Error Raster Compression
Stars: ✭ 126 (-11.27%)
Mutual labels:  compression
Model Quantization
Collections of model quantization algorithms
Stars: ✭ 118 (-16.9%)
Mutual labels:  compression
Archivist
A full-stack publishing solution involving different technologies to power digital archives
Stars: ✭ 130 (-8.45%)
Mutual labels:  archive
Deep K Means Pytorch
[ICML 2018] "Deep k-Means: Re-Training and Parameter Sharing with Harder Cluster Assignments for Compressing Deep Convolutions"
Stars: ✭ 115 (-19.01%)
Mutual labels:  compression
Image Optimize Command
Easily optimize images using WP CLI
Stars: ✭ 138 (-2.82%)
Mutual labels:  compression
Shiftresnet Cifar
ResNet with Shift, Depthwise, or Convolutional Operations for CIFAR-100, CIFAR-10 on PyTorch
Stars: ✭ 112 (-21.13%)
Mutual labels:  compression
Cstore fdw
Columnar storage extension for Postgres built as a foreign data wrapper. Check out https://github.com/citusdata/citus for a modernized columnar storage implementation built as a table access method.
Stars: ✭ 1,642 (+1056.34%)
Mutual labels:  compression
Fsarchiver
file system archiver for linux
Stars: ✭ 135 (-4.93%)
Mutual labels:  compression
Ahk Libs
AutoHotkey library archive.
Stars: ✭ 125 (-11.97%)
Mutual labels:  archive

Build Status Download codecov

Junrar

Read and extracts from a .rar file. This is a fork of the junrar codebase, formerly on sourceforge.

Code may not be used to develop a RAR (WinRAR) compatible archiver.

Supported features

  • RAR 4 and lower (there is no RAR 5 support)
  • password protected archives (also with encrypted headers)
  • multi-part archives
  • extract from File and InputStream
  • extract to File and OutputStream

Installation

Gradle
implementation "com.github.junrar:junrar:{version}"
Gradle (Kotlin DSL)
implementation("com.github.junrar:junrar:{version}")
Maven
<dependency>
    <groupId>com.github.junrar</groupId>
    <artifactId>junrar</artifactId>
    <version>{version}</version>
</dependency>

where {version} corresponds to version as below:

  • Java 8 Version: Download
  • Java 6 Compatible Version: Download

Apache Commons VFS support has been removed from 5.0.0, and moved to a dedicated repo: https://github.com/junrar/commons-vfs-rar

Usage

Extract from a file to a directory:

Junrar.extract("/tmp/foo.rar", "/tmp");
//or
final File rar = new File("foo.rar");  
final File destinationFolder = new File("destinationFolder");
Junrar.extract(rar, destinationFolder);    
//or
final InputStream resourceAsStream = Foo.class.getResourceAsStream("foo.rar");//only for a single rar file
Junrar.extract(resourceAsStream, tempFolder);

Extract from an InputStream to an OutputStream

// Assuming you already have an InputStream from the rar file and an OutputStream for writing to
final Archive archive = new Archive(inputStream);
  while (true) {
      FileHeader fileHeader = archive.nextFileHeader();
      if (fileHeader == null) {
          break;
      }
      archive.extractFile(fileHeader, outputStream); 
  }

List files

final List<ContentDescription> contentDescriptions = Junrar.getContentsDescription(testDocuments);    

Extract a password protected archive

Junrar.extract("/tmp/foo.rar", "/tmp", "password");
//or
final File rar = new File("foo.rar");  
final File destinationFolder = new File("destinationFolder");
Junrar.extract(rar, destinationFolder, "password");    
//or
final InputStream resourceAsStream = Foo.class.getResourceAsStream("foo.rar");//only for a single rar file
Junrar.extract(resourceAsStream, tempFolder, "password");

Extract a multi-volume archive

Junrar.extract("/tmp/foo.001.rar", "/tmp");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].