UnrarKit

repository·v2.11·Indexed 43 days ago

https://github.com/abbeycode/unrarkit

A Cocoa library for iOS and macOS used to handle RAR archives, featuring capabilities for listing file details, extracting files to directories or memory, and reporting progress.

Tokens
520
Snippets
2
Records
5
Agent score
6%

What's inside UnrarKit

  1. Legal usage and restrictions for Unrar source

    v2.11

    The Unrar source is freeware and subject to the following terms:

    • Permitted Use: You may use the source in any software to handle RAR archives without limitations or fees.
    • Permitted Distribution: You may distribute the modified source either as a standalone package or as part of other software, provided you clearly state in the documentation and source comments that the code cannot be used to develop a RAR (WinRAR) compatible archiver.
    • Prohibited Use: You are strictly prohibited from using the source to re-create the proprietary RAR compression algorithm.
  2. Install UnrarKit via CocoaPods or Carthage

    v2.11

    UnrarKit can be integrated into your Mac or iOS project using either CocoaPods or Carthage.

    Note: If you are using dynamic framework targets, CocoaPods may not be compatible (as of v0.39.0); in those cases, use Carthage.

    Carthage

    Add the following to your Cartfile:

    github "abbeycode/UnrarKit"

    CocoaPods

    Add the following to your Podfile:

    pod "UnrarKit"
    github "abbeycode/UnrarKit"
    
    pod "UnrarKit"
  3. Porting Unrar to a new platform

    v2.11

    If you are porting the Unrar C++ source to a new hardware architecture, you may need to modify specific header files to handle endianness and data alignment:

    • Endianness: Edit #define LITTLE_ENDIAN in os.hpp.
    • Data Types: Edit data type definitions in rartypes.hpp.
    • Memory Alignment: If the computer architecture does not allow non-aligned data access, you must undefine ALLOW_NOT_ALIGNED_INT and define STRICT_ALIGNMENT_REQUIRED in os.h.
  4. Initialize a URKArchive instance

    v2.11

    To work with a RAR file, initialize a URKArchive object using its path. This is the entry point for all read-only operations like listing files or extracting data.

    ```Objective-C
    NSError *archiveError = nil;
    URKArchive *archive = [[URKArchive alloc] initWithPath:@