Giter Club home page Giter Club logo

plzmasdk's Introduction

platform language Cocoapods Cocoapods SwiftPM compatible GitHub release node-current Build Status Build status Language grade: C/C++ Language grade: JavaScript

PLzmaSDK is (Portable, Patched, Package, cross-P-latform) Lzma SDK. Based on original LZMA SDK version 23.01 and patched for unix platforms. Available for all Apple's platforms(iOS, macOS, tvOS, watchOS), Android, Windows, Linux and any unix'es.

Features / detailed description


  • The SDK is available for the next programming languages:
  • Supports next archives:
    • 7z. Both, encrypted/password-protected and unencrypted archive items-list and it's content. Lzma and Lzma2 compression methods.
    • xz. Lzma2 compression method.
    • tar/tarball. *.tar, *.tar.xz and *.tar.7z archives.
  • Supports list, test, extract and compress operations. All these operations can be executed in a separate thread and aborted during the process.
  • Supports 7z multivolume archives.
  • Thread safe encoder, decoder and progress tracking. Depending of usage, you can disable all thread synchronizations via CMake's boolean option LIBPLZMA_OPT_THREAD_UNSAFE:BOOL=YES or preprocessor definition LIBPLZMA_THREAD_UNSAFE=1.
  • Supports memory and file IO streams. The extracting and compressing might be from ⇔ to memory or file.
  • Support extracting and compressing archive files with size more than 4GB(x64 support).
  • Track smoothed progress.
  • Full UTF8 support.
  • Available for any platform with compiller which supports the C++11 standard. Let's say, almost everywhere nowadays.
  • No external dependencies. Also no STL (of couse not in a public interface and internally).
  • The SDK is organized as C and C++ library at the same time. And supports static and dynamic linking.

Optional features

All optional features are enabled by default, but they might be disabled during the build process to reduce the binary size, and of course, if you are not planning to use them.

  • tar/tarball archive support. To disable, use the CMake's boolean option LIBPLZMA_OPT_NO_TAR:BOOL=YES or preprocessor definition LIBPLZMA_NO_TAR=1
  • Thread safety. To disable, use the CMake's boolean option LIBPLZMA_OPT_THREAD_UNSAFE:BOOL=YES or preprocessor definition LIBPLZMA_THREAD_UNSAFE=1
  • Progress tracking. To disable, use the CMake's boolean option LIBPLZMA_OPT_NO_PROGRESS:BOOL=YES or preprocessor definition LIBPLZMA_NO_PROGRESS=1
  • C bindings to the whole functionality of the library in libplzma.h header. To disable, use the CMake's boolean option LIBPLZMA_OPT_NO_C_BINDINGS:BOOL=YES or preprocessor definition LIBPLZMA_NO_C_BINDINGS=1
  • Crypto functionality. Not recommended! But possible. Do this only if you know what are you doing! To disable, use the CMake's boolean option LIBPLZMA_OPT_NO_CRYPTO:BOOL=YES or preprocessor definition LIBPLZMA_NO_CRYPTO=1

Installation


Swift Package Manager

.package(url: "https://github.com/OlehKulykov/PLzmaSDK.git", .exact("1.4.3"))

CocoaPods Podfile (Swift)

use_frameworks!
platform :ios, '11.0'

target '<REPLACE_WITH_YOUR_TARGET>' do
    pod 'PLzmaSDK', '1.4.3'
end

CocoaPods Podfile (Objective-C)

use_frameworks!
platform :ios, '9.0'

target '<REPLACE_WITH_YOUR_TARGET>' do
    pod 'PLzmaSDK-ObjC', '1.4.3'
end

npm via 'package.json'

{
  "engines": {
    "node": ">=13.0.0",
    "npm": ">=6.0.0"
  },
  "dependencies": {
    "plzmasdk": "1.4.3"
  }
}

Android NDK

cd <PATH_TO_ANDROID_NDK>
./ndk-build NDK_PROJECT_PATH=<PATH_TO_PLZMASDK>/PLzmaSDK/android

CMake Unix

cd PLzmaSDK
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4

CMake Windows

cd PLzmaSDK
md build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --parallel 4

Examples


Extract or test

Open, list and select archive items for extracting or testing.

The process consists of four steps:

  1. Create a source input stream for reading archive file content. The input stream might be created with:
    1. The path to the archive file.
    2. The archive file content in memory, i.e. using const memory or it's copy for internal usage.
    3. The custom read/seek callbacks(C/C++ only).
  2. Create decoder with source input stream, type of the archive and optional progress delegate.
    1. Optionaly provide the password to open and list encrypted archive and for a future extracting or testing.
  3. Select archive items for extracting or testing. Migth be skiped if you want to process all items(the whole archive), see below.
    1. Select all archive items as is.
    2. Retrieve the number of items, iterate them by index, filter and/or select.
  4. Extract or test selected archive items. The extract process might be:
    1. Extract all items to a directory. In this case, you can skip the step #3.
    2. Extract selected items to a directory.
    3. Extract each item to a custom out-stream. The out-stream might be a file or memory. I.e. extract 'item #1' to a file stream, extract 'item #2' to a memory stream(then take extacted memory) and so on.
Swift
do {
    // 1. Create a source input stream for reading archive file content.
    //  1.1. Create a source input stream with the path to an archive file.
    let archivePath = try Path("path/to/archive.7z")
    let archivePathInStream = try InStream(path: archivePath)

    //  1.2. Create a source input stream with the file content.
    let archiveData = Data(...)
    let archiveDataInStream = try InStream(dataNoCopy: archiveData) // also available Data(dataCopy: Data)

    // 2. Create decoder with source input stream, type of archive and optional delegate.
    let decoder = try Decoder(stream: archiveDataInStream /* archivePathInStream */, fileType: .sevenZ, delegate: self)
    
    //  2.1. Optionaly provide the password to open/list/test/extract encrypted archive items.
    try decoder.setPassword("1234")
    
    let opened = try decoder.open()
    
    // 3. Select archive items for extracting or testing.
    //  3.1. Select all archive items.
    let allArchiveItems = try decoder.items()
    
    //  3.2. Get the number of items, iterate items by index, filter and select items.
    let numberOfArchiveItems = try decoder.count()
    let selectedItemsDuringIteration = try ItemArray(capacity: numberOfArchiveItems)
    let selectedItemsToStreams = try ItemOutStreamArray()
    for itemIndex in 0..<numberOfArchiveItems {
        let item = try decoder.item(at: itemIndex)
        try selectedItemsDuringIteration.add(item: item)
        try selectedItemsToStreams.add(item: item, stream: OutStream()) // to memory stream
    }
    
    // 4. Extract or test selected archive items. The extract process might be:
    //  4.1. Extract all items to a directory. In this case, you can skip the step #3.
    let extracted = try decoder.extract(to: Path("path/outdir"))
    
    //  4.2. Extract selected items to a directory.
    let extracted = try decoder.extract(items: selectedItemsDuringIteration, to: Path("path/outdir"))
    
    //  4.3. Extract each item to a custom out-stream. 
    //       The out-stream might be a file or memory. I.e. extract 'item #1' to a file stream, extract 'item #2' to a memory stream(then take extacted memory) and so on.
    let extracted = try decoder.extract(itemsToStreams: selectedItemsToStreams)
} catch let exception as Exception {
    print("Exception: \(exception)")
}
JavaScript
const plzma = require('plzmasdk');

try {
    // 1. Create a source input stream for reading archive file content.
    //  1.1. Create a source input stream with the path to an archive file.
    const archivePath = plzma.Path(__dirname).append('path/to/archive.7z');
    const archivePathInStream = new plzma.InStream(archivePath /* 'path/to/archive.7z' */);

    //  1.2. Create a source input stream with the file content.
    const archiveData = new ArrayBuffer(...);
    const archiveDataInStream = new plzma.InStream(archiveData);

    // 2. Create decoder with source input stream, type of archive and optional delegate.
    const decoder = new plzma.Decoder(archivePathInStream, plzma.FileType.sevenZ);
    decoder.setProgressDelegate((path, progress) => console.log(`Delegating progress, path: ${path}, progress: ${progress}`) );

    //  2.1. Optionaly provide the password to open/list/test/extract encrypted archive items.
    decoder.setPassword('1234');

    const opened = await decoder.openAsync(); // also available sync. version 'decoder.open()'

    // 3. Select archive items for extracting or testing.
    //  3.1. Select all archive items.
    const allArchiveItems = decoder.items;

    //  3.2. Get the number of items, iterate items by index, filter and select items.
    const selectedItemsDuringIteration = [];
    const selectedItemsToStreams = new Map();
    for (let itemIndex = 0, numberOfArchiveItems = decoder.count; itemIndex <  numberOfArchiveItems; itemIndex++) {
        const item = decoder.itemAt(itemIndex);
        selectedItemsDuringIteration.push(item);
        selectedItemsToStreams.set(item, plzma.OutStream()); // to memory stream
    }
    
    // 4. Extract or test selected archive items. The extract process might be:
    //  4.1. Extract all items to a directory. In this case, you can skip the step #3.
    const extracted = await decoder.extractAsync('path/outdir'); // also available sync. version 'decoder.extract()'
    
    //  4.2. Extract selected items to a directory.
    const extracted = await decoder.extractAsync(selectedItemsDuringIteration, 'path/outdir'); // also available sync. version 'decoder.extract()'
    
    //  4.3. Extract each item to a custom out-stream. 
    //       The out-stream might be a file or memory. I.e. extract 'item #1' to a file stream, extract 'item #2' to a memory stream(then take extacted memory) and so on.
    const extracted = await decoder.extractAsync(selectedItemsToStreams); // also available sync. version 'decoder.extract()'
} catch (error) {
    console.log(`Exception: ${error}`);
}
C++
try {
    // 1. Create a source input stream for reading archive file content.
    //  1.1. Create a source input stream with the path to an archive file.
    Path archivePath("path/to/archive.7z"); // Path(L"C:\\\\path\\to\\archive.7z");
    auto archivePathInStream = makeSharedInStream(archivePath /* std::move(archivePath) */);
    
    //  1.2. Create a source input stream with the file content.
    auto archiveDataInStream = makeSharedInStream(<FILE DATA>, <FILE SIZE>);
    
    // 2. Create decoder with source input stream, type of archive and provide optional delegate.
    auto decoder = makeSharedDecoder(archiveDataInStream, plzma_file_type_7z);
    decoder->setProgressDelegate(this);
    
    //  2.1. Optionaly provide the password to open/list/test/extract encrypted archive items.
    decoder->setPassword("1234"); // decoder->setPassword(L"1234");
        
    bool opened = decoder->open();
    
    // 3. Select archive items for extracting or testing.
    //  3.1. Select all archive items.
    auto allArchiveItems = decoder->items();

    //  3.2. Get the number of items, iterate items by index, filter and select items.
    size_t numberOfArchiveItems = decoder->count();
    auto selectedItemsDuringIteration = makeShared<ItemArray>(numberOfArchiveItems);
    auto selectedItemsToStreams = makeShared<ItemOutStreamArray>();
    for (size_t itemIndex = 0; itemIndex < numberOfArchiveItems; itemIndex++) {
        auto item = decoder->itemAt(itemIndex);
        selectedItemsDuringIteration->push(item /* std::move(item) */);
        selectedItemsToStreams->push(Pair<SharedPtr<Item>, SharedPtr<OutStream> >(item, makeSharedOutStream())); // to memory stream
    }
    
    // 4. Extract or test selected archive items. The extract process might be:
    //  4.1. Extract all items to a directory. In this case, you can skip the step #3.
    bool extracted = decoder->extract(Path("path/outdir"));
    
    //  4.2. Extract selected items to a directory.
    bool extracted = decoder->extract(selectedItemsDuringIteration, Path("path/outdir"));
    
    //  4.3. Extract each item to a custom out-stream. 
    //       The out-stream might be a file or memory. I.e. extract 'item #1' to a file stream, extract 'item #2' to a memory stream(then take extacted memory) and so on.
    bool extracted = decoder->extract(selectedItemsToStreams);
} catch (const Exception & exception) {
    std::cout << "Exception: " << exception.what() << std::endl;
}
C
// 1. Create a source input stream for reading archive file content.
//  1.1. Create a source input stream with the path to an archive file.
plzma_path archivePath = plzma_path_create_with_utf8_string("path/to/archive.7z"); // plzma_path_create_with_wide_string(L"C:\\\\path\\to\\archive.7z");
plzma_in_stream archivePathInStream = plzma_in_stream_create_with_path(&archivePath); // plzma_in_stream_create_with_pathm(...);
plzma_path_release(&archivePath);
plzma_in_stream_release(&archivePathInStream); // when no longer needed

//  1.2. Create a source input stream with the file content in memory.
plzma_in_stream archiveDataInStream = plzma_in_stream_create_with_memory_copy(<FILE DATA>, <FILE SIZE>); // plzma_in_stream_create_with_memory(...);

// 2. Create decoder with source input stream, type of archive, context for optional delegate and provide optional delegate callback.
plzma_decoder decoder = plzma_decoder_create(&archiveDataInStream, plzma_file_type_7z, plzma_context{ nullptr, nullptr }); // C2059 = { .context = nullptr, .deinitializer = nullptr }
plzma_in_stream_release(&archiveDataInStream); // when no longer needed

plzma_decoder_set_progress_delegate_utf8_callback(&decoder, <UTF8 C CALLBACK>);  // plzma_decoder_set_progress_delegate_wide_callback(...);

//  2.1. Optionaly provide the password to open/list/test/extract encrypted archive items.
plzma_decoder_set_password_utf8_string(&decoder, "1234"); // plzma_decoder_set_password_wide_string(&decoder, L"1234");

bool opened = plzma_decoder_open(&decoder);    

// 3. Select archive items for extracting or testing.
//  3.1. Select all archive items.
plzma_item_array allArchiveItems = plzma_decoder_items(&decoder);

//  3.2. Get the number of items, iterate items by index, filter and select items.
size_t numberOfArchiveItems = plzma_decoder_count(&decoder);
plzma_item_array selectedItemsDuringIteration = plzma_item_array_create(numberOfArchiveItems);
plzma_item_out_stream_array selectedItemsToStreams = plzma_item_out_stream_array_create(numberOfArchiveItems);
for (size_t itemIndex = 0; itemIndex < numberOfArchiveItems; itemIndex++) {
    plzma_item item = plzma_decoder_item_at(&decoder, itemIndex);
    plzma_item_array_add(&selectedItemsDuringIteration, &item);
    
    plzma_out_stream outItemStream = plzma_out_stream_create_memory_stream(); // to memory stream
    plzma_item_out_stream_array_add(&selectedItemsToStreams, &item, &outItemStream);
    plzma_out_stream_release(&outItemStream);
    
    plzma_item_release(&item);
}

// 4. Extract or test selected archive items. The extract process might be:
//  4.1. Extract all items to a directory. In this case, you can skip the step #3.
plzma_path extractPath = plzma_path_create_with_utf8_string("path/outdir");
bool extracted = plzma_decoder_extract_all_items_to_path(&decoder, &extractPath, true);
plzma_path_release(&extractPath);

//  4.2. Extract selected items to a directory.
plzma_path extractPath = plzma_path_create_with_utf8_string("path/outdir");
bool extracted = plzma_decoder_extract_items_to_path(&decoder, &selectedItemsDuringIteration, &extractPath, true);
plzma_path_release(&extractPath);

//  4.3. Extract each item to a custom out-stream. 
//       The out-stream might be a file or memory. I.e. extract 'item #1' to a file stream, extract 'item #2' to a memory stream(then take extacted memory) and so on.
bool extracted = plzma_decoder_extract_item_out_stream_array(&decoder, &selectedItemsToStreams);

plzma_item_array_release(&selectedItemsDuringIteration); // when no longer needed 
plzma_item_array_release(&allArchiveItems); // when no longer needed
plzma_item_out_stream_array_release(&selectedItemsToStreams); // when no longer needed
plzma_decoder_release(&decoder); // when no longer needed

Compress

Create output, setup encoder/archive, add content, open & compress.

The process consists of 4 steps:

  1. Create output stream for writing archive's file content. The output stream might be created with:
    1. The path to the archive file.
    2. Create memory stream without any arguments.
  2. Create encoder with output stream, type of the archive, compression method and optional progress delegate.
    1. Optionaly provide the password in case of header and/or content encryption.
    2. Setup archive properties.
  3. Add content for archiving. The content might be next:
    1. Single file path with optional path inside the archive.
    2. Single directory path with optional directory iteration option and optional path inside the archive.
    3. Any input stream with required path inside the archive.
  4. Open & compress.
Swift
do {
    // 1. Create output stream for writing archive's file content.
    //  1.1. Using file path.
    let archivePath = Path("path/out.7z");
    let archivePathOutStream = try OutStream(path: archivePath)
    
    // 2. Create encoder with output stream, type of the archive, compression method and optional progress delegate.
    let encoder = try Encoder(stream: archivePathOutStream, fileType: .sevenZ, method: .LZMA2, delegate: self)
    
    //  2.1. Optionaly provide the password in case of header and/or content encryption.
    try encoder.setPassword("1234")
    
    //  2.2. Setup archive properties.
    try encoder.setShouldEncryptHeader(true)  // use this option with password.
    try encoder.setShouldEncryptContent(true) // use this option with password.
    try encoder.setCompressionLevel(9)
    
    // 3. Add content for archiving.
    //  3.1. Single file path with optional path inside the archive.
    try encoder.add(path: Path("dir/my_file1.txt")) // store as "dir/my_file1.txt", as is.
    try encoder.add(path: Path("dir/my_file2.txt"), mode: .default, archivePath: Path("renamed_file2.txt")) // store as "renamed_file2.txt"
    
    //  3.2. Single directory path with optional directory iteration option and optional path inside the archive.
    try encoder.add(path: Path("dir/dir1")) // store as "dir1/..."
    try encoder.add(path: Path("dir/dir2"), mode: .followSymlinks, archivePath: Path("renamed_dir2")) // store as "renamed_dir2/..."
    
    //  3.3. Any input stream with required path inside the archive.
    let itemStream = try InStream(dataCopy: <Data>) // InStream(dataNoCopy: <Data>)
    try encoder.add(stream: itemStream, archivePath: Path("my_file3.txt")) // store as "my_file3.txt"
    
    // 4. Open.
    let opened = try encoder.open()
    
    // 4. Compress.
    let compressed = try encoder.compress()
} catch let exception as Exception {
    print("Exception: \(exception)")
}
JavaScript
const plzma = require('plzmasdk');

try {
    // 1. Create output stream for writing archive's file content.
    //  1.1. Using file path.
    const archivePathOutStream = new plzma.OutStream('path/out.7z');

    // 2. Create encoder with output stream, type of the archive, compression method and optional progress delegate.
    const encoder = plzma.Encoder(archivePathOutStream, plzma.FileType.sevenZ, plzma.Method.LZMA2);
    encoder.setProgressDelegate((path, progress) => console.log(`Delegating progress, path: ${path}, progress: ${progress}`) );
    
    //  2.1. Optionaly provide the password in case of header and/or content encryption.
    encoder.setPassword('1234');

    //  2.2. Setup archive properties.
    encoder.shouldEncryptHeader = true;  // use this option with password.
    encoder.shouldEncryptContent = true; // use this option with password.
    encoder.compressionLevel = 9;
    
    // 3. Add content for archiving.
    //  3.1. Single file path with optional path inside the archive.
    encoder.add('dir/my_file1.txt'); // store as "dir/my_file1.txt", as is.
    encoder.add('dir/my_file2.txt', 0, 'renamed_file2.txt'); // store as "renamed_file2.txt"
    
    //  3.2. Single directory path with optional directory iteration option and optional path inside the archive.
    encoder.add('dir/dir1'); // store as "dir1/..."
    encoder.add('dir/dir2', plzma.OpenDirMode.followSymlinks, 'renamed_dir2'); // store as "renamed_dir2/..."

    //  3.3. Any input stream with required path inside the archive.
    const itemStream = plzma.InStream(new ArrayBuffer(...));
    encoder.add(itemStream, 'my_file3.txt'); // store as "my_file3.txt"
    
    // 4. Open.
    const opened = await encoder.openAsync(); // also available sync. version 'encoder.open()'
    
    // 4. Compress.
    const compressed = await encoder.compressAsync(); // also available sync. version 'encoder.compress()'
} catch (error) {
    console.log(`Exception: ${error}`);
}
C++
try {
    // 1. Create output stream for writing archive's file content.
    //  1.1. Using file path.
    const auto archivePathOutStream = makeSharedOutStream(Path("path/out.7z"));

    // 2. Create encoder with output stream, type of the archive, compression method and optional progress delegate.
    auto encoder = makeSharedEncoder(archivePathOutStream, plzma_file_type_7z, plzma_method_LZMA2);
    encoder->setProgressDelegate(_progressDelegate);

    //  2.1. Optionaly provide the password in case of header and/or content encryption.
    encoder->setPassword("1234");
    
    //  2.2. Setup archive properties.
    encoder->setShouldEncryptHeader(true);   // use this option with password.
    encoder->setShouldEncryptContent(true);  // use this option with password.
    encoder->setCompressionLevel(9);

    // 3. Add content for archiving.
    //  3.1. Single file path with optional path inside the archive.
    encoder->add(Path("dir/my_file1.txt"));  // store as "dir/my_file1.txt", as is.
    encoder->add(Path("dir/my_file2.txt"), 0, Path("renamed_file2.txt")); // store as "renamed_file2.txt"

    //  3.2. Single directory path with optional directory iteration option and optional path inside the archive.
    encoder->add(Path("dir/dir1")); // store as "dir1/..."
    encoder->add(Path("dir/dir2"), plzma_open_dir_mode_follow_symlinks, Path("renamed_dir2")); // store as "renamed_dir2/..."

    //  3.3. Any input stream with required path inside the archive.
    auto itemStream = makeSharedInStream(<DATA>, <DATA_SIZE>);
    encoder->add(itemStream, Path("my_file3.txt")); // store as "my_file3.txt"
    
    // 4. Open.
    bool opened = encoder->open();

    // 4. Compress.
    bool compressed = encoder->compress();
} catch (const Exception & exception) {
    std::cout << "Exception: " << exception.what() << std::endl;
}
C
// 1. Create output stream for writing archive's file content.
//  1.1. Using file path.
plzma_path archivePath = plzma_path_create_with_utf8_string("path/out.7z");
plzma_out_stream archivePathOutStream = plzma_out_stream_create_with_path(&archivePath);

// 2. Create encoder with output stream, type of the archive, compression method and optional progress delegate.
plzma_context context;
plzma_encoder encoder = plzma_encoder_create(&archivePathOutStream, plzma_file_type_7z, plzma_method_LZMA2, context);
plzma_encoder_set_progress_delegate_utf8_callback(&encoder, <C_CALLBACK_FUNCTION>);

//  2.1. Optionaly provide the password in case of header and/or content encryption.
plzma_encoder_set_password_utf8_string(&encoder, "1234");

//  2.2. Setup archive properties.
plzma_encoder_set_should_encrypt_header(&encoder, true);   // use this option with password.
plzma_encoder_set_should_encrypt_content(&encoder, true);  // use this option with password.
plzma_encoder_set_compression_level(&encoder, 9);

// 3. Add content for archiving.
//  3.1. Single file path with optional path inside the archive.
plzma_path itemPath = plzma_path_create_with_utf8_string("dir/my_file1.txt");
plzma_encoder_add_path(&encoder, &itemPath, 0, NULL); // store as "dir/my_file1.txt", as is.
plzma_path_release(&itemPath);

itemPath = plzma_path_create_with_utf8_string("dir/my_file2.txt");
plzma_path itemArchivePath = plzma_path_create_with_utf8_string("renamed_file2.txt");
plzma_encoder_add_path(&encoder, &itemPath, 0, &itemArchivePath); // store as "renamed_file2.txt"
plzma_path_release(&itemPath);
plzma_path_release(&itemArchivePath);

//  3.2. Single directory path with optional directory iteration option and optional path inside the archive.
itemPath = plzma_path_create_with_utf8_string("dir/dir1");
plzma_encoder_add_path(&encoder, &itemPath, 0, NULL); // store as "dir1/..."
plzma_path_release(&itemPath);

itemPath = plzma_path_create_with_utf8_string("dir/dir2");
itemArchivePath = plzma_path_create_with_utf8_string("renamed_dir2");
plzma_encoder_add_path(&encoder, &itemPath, plzma_open_dir_mode_follow_symlinks, &itemArchivePath); // store as "renamed_dir2/..."
plzma_path_release(&itemPath);
plzma_path_release(&itemArchivePath);

//  3.3. Any input stream with required path inside the archive.
itemArchivePath = plzma_path_create_with_utf8_string("my_file3.txt");
plzma_in_stream itemStream = plzma_in_stream_create_with_memory(<DATA>, <DATA_SIZE>);
plzma_encoder_add_stream(&encoder, &itemStream, &itemArchivePath); // store as "my_file3.txt"
plzma_in_stream_release(&itemStream);
plzma_path_release(&itemArchivePath);

// 4. Open.
bool opened = plzma_encoder_open(&encoder);

// 4. Compress.
bool compressed = plzma_encoder_compress(&encoder);

plzma_out_stream_release(&archivePathOutStream); // when no longer needed
plzma_path_release(&archivePath); // when no longer needed
plzma_encoder_release(&encoder); // when no longer needed

License


By using this all you are accepting original LZMA SDK and MIT license (see below):

The MIT License (MIT)

Copyright (c) 2015 - 2024 Oleh Kulykov [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

plzmasdk's People

Contributors

apodrugin avatar arthuralvarez avatar olehkulykov avatar thangbdph19964 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plzmasdk's Issues

Can't use it in android kotlin

I read docs here only this line
cd <PATH_TO_ANDROID_NDK>./ndk-build NDK_PROJECT_PATH=<PATH_TO_PLZMASDK>/PLzmaSDK/android

for android ? please add a detailed demo i don't know how to use the library with android kotlin.

EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB) from inside an iOS Widget extension

Hi 👋

I am using this library to decompress some selected files that have a specific prefix from an archive. I an doing it from inside a Widget extension, in iOS. The total decompressed size of the files to decompress is 4MB, the decompressed archive is 120MB, and the archive itself is 10MB. The decompression code is as follows:

func decompress(prefix: String, from archiveUrl: URL, to outputUrl: URL) throws {
    let archivePath = try Path(archiveUrl.path)
    let archivePathInStream = try InStream(path: archivePath)

    let decoder = try Decoder(stream: archivePathInStream, fileType: .sevenZ, delegate: self)

    guard try decoder.open() else {
        throw PLzmaServiceError.couldNotOpenDecoder
    }

    let numberOfArchiveItems = try decoder.count()
    let selectedItemsDuringIteration = try ItemArray(capacity: numberOfArchiveItems)

    for itemIndex in 0..<numberOfArchiveItems {
        let item = try decoder.item(at: itemIndex)
        let path = try String(describing: item.path())
        if path.hasPrefix("\(prefix)/") {
            try selectedItemsDuringIteration.add(item: item)
        }
    }

    let extracted = try decoder.extract(
        items: selectedItemsDuringIteration,
        to: try Path(outputUrl.path)
    )

    guard extracted else {
        throw PLzmaServiceError.couldNotExtract
    }
}

During that operations I get a runtime exception saying EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB). Seems like the Widget extension has some memory limits enforced by iOS, and the decompression is exceeding them. As a result, the OS kills the process in the middle of the decompression operation.

Screenshot 2023-09-16 at 14 50 28 Screenshot 2023-09-16 at 14 50 39

Is there any way to configure the decompression so it uses less memory?

Thanks!

Detect password protected files

How can i detect a password protected file ?

Can you suggest a way to handle the password protected files. The exception description says "can't open in archive".
I am extracting the file and checking that, if it is not getting extracted then displaying a "enter password" prompt. But if it is not getting extracted for some other reason , then how can i know ?

Any API available for Password Protected files other than setPassword() ?

Error reporting using source code compilation

I first import libplzma. h, libplzma. hpp, and objc folders, and then use plzmasdk in the following two ways

  1. Import libplzma_ Static.a static library, no problem with compilation
  2. Import the src folder and compile an error. The error is as follows

lALPJxf-1V5iz7XNBBLNCyI_2850_1042

How to fix this error?

Missing Streaming Interface for Swift

I was assessing PLzmaSDK to see if it could be useful for my Swift based project which uses a protocol to abstract over (stream) compression implementations, a bit like this:

protocol DeflateProtocol {
    func append (_ buffer: Data) -> Data
    func finalize () -> Data
}

Possible solutions that I can see for PLzmaSDK to support this kind of interface:

  • Make InStream.init(stream:) public, so I can do all the dirty work mapping back and forth between @convention(c) and Swift callbacks.
  • Provide an initializer for InStream accepting Swift callbacks.

Which of these sounds more acceptable for the PLzmaSDK project?

7z extract progress error

There is a problem with the progress of the 7z decompression. The progress only shows 0%, 50%,100% during the decompression process

android ndk-build failed

Hi, android ndk-build failed:
jni/../../src/CPP/7zip/Common/FileStreams.cpp:554:27: error: use of undeclared identifier 'major'
prop = (UInt32)(major(st.st_rdev)); // + 1000);
^
jni/../../src/CPP/7zip/Common/FileStreams.cpp:562:27: error: use of undeclared identifier 'minor'
prop = (UInt32)(minor(st.st_rdev)); // + 100);
^
2 errors generated.

I've tried plzmaSDK 1.2.2 and 1.2.3. And tried with several ndk-version,
Did I miss something?

encoder.setPassword is not working

I used the method in the demo to set the password and compressed it successfully. But when I uncompressed the file, I did not need to enter a password to uncompress it.

Support for Zstandard

Hi 👋

Thanks for such a GREAT library 🎉
Wanted to ask about Zstandard support.

I see that p7zip supports Zstandard.
I tried to extract a file with PLzmaSDK from an archive created with -m0=zstd, but it failed.

Do you have any plans for supporting it?

Thanks again

How to use multivolume archives

I found that README mentioned the PLzmaSDK support 7z multivolume archives, but I don't know how to implement it. Can you give me some guidance

Crash decoding an archive in String function (Swift 1.1.3)

Using Swift 1.1.3 version, I get this crash decoding an archive. Note that the MacOS finder opens the archive correctly, the old LzmaSDKObjC opened it as well, although it was missing some files.

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: Unexpectedly found nil while unwrapping an Optional value
    frame #0: 0x00000001ad10bd84 libswiftCore.dylib`_swift_runtime_on_report
    frame #1: 0x00000001ad184de8 libswiftCore.dylib`_swift_stdlib_reportFatalErrorInFile + 192
    frame #2: 0x00000001acdc0a0c libswiftCore.dylib`closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in Swift._assertionFailure(_: Swift.StaticString, _: Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 404
    frame #3: 0x00000001acdc0048 libswiftCore.dylib`Swift._assertionFailure(_: Swift.StaticString, _: Swift.StaticString, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 396
  * frame #4: 0x000000010508d314 PLzmaSDK-Dynamic`String.init(ptr=0x6000033c2850) at String+Plzma.swift:34:53
    frame #5: 0x000000010507b318 PLzmaSDK-Dynamic`closure #2 in Decoder.init(ctx=0x600000166e80, utf8CString=0x6000033c2850, progress=0x3fd9bbd30c4b7e1c) at Decoder.swift:280:58
    frame #6: 0x000000010507b38c PLzmaSDK-Dynamic`@objc closure #2 in Decoder.init(stream:fileType:delegate:) at <compiler-generated>:0
    frame #7: 0x000000010515a6f4 PLzmaSDK-Dynamic`plzma::Progress::ReportData::report(this=0x000000016d69fa28) const at plzma_progress.hpp:63:21
    frame #8: 0x000000010515ace4 PLzmaSDK-Dynamic`plzma::Progress::setPath(this=0x00006000039ba640, path=0x000000016d69fcc0) at plzma_progress.cpp:173:20
    frame #9: 0x00000001051455b4 PLzmaSDK-Dynamic`plzma::ExtractCallback::getExtractStream(this=0x000000012de94700, index=28, outStream=0x000000016d69fe30) at plzma_extract_callback.cpp:187:20
    frame #10: 0x0000000105145930 PLzmaSDK-Dynamic`plzma::ExtractCallback::GetStream(this=0x000000012de94700, index=28, outStream=0x000000016d69fe30, askExtractMode=0) at plzma_extract_callback.cpp:208:42
    frame #11: 0x00000001050ca168 PLzmaSDK-Dynamic`NArchive::N7z::CFolderOutStream::OpenFile(this=0x0000600002fecb90, isCorrupted=false) at 7zExtract.cpp:93:3
    frame #12: 0x00000001050ca790 PLzmaSDK-Dynamic`NArchive::N7z::CFolderOutStream::Write(this=0x0000600002fecb90, data=0x00000002c5fa8407, size=130169, processedSize=0x000000016d69ff08) at 7zExtract.cpp:195:5
    frame #13: 0x000000010510f3cc PLzmaSDK-Dynamic`WriteStream(stream=0x0000600002fecb90, data=0x00000002c5bc8080, size=4194304) at StreamUtils.cpp:48:27
    frame #14: 0x00000001051026a4 PLzmaSDK-Dynamic`MyWrite(pp=0x000000016d6a0188, data=0x00000002c5bc8080, size=4194304) at CWrappers.cpp:93:14
    frame #15: 0x00000001050a25d8 PLzmaSDK-Dynamic`Lzma2Dec_Decode_ST(p=0x000000011a5b7a80) at Lzma2DecMt.c:748:26
    frame #16: 0x00000001050a2210 PLzmaSDK-Dynamic`Lzma2DecMt_Decode(pp=0x000000011a5b7a80, prop='\x1c', props=0x000000016d6a01c8, outStream=0x000000016d6a0188, outDataSize=0x0000600002fe9378, finishMode=1, inStream=0x000000016d6a01a8, inProcessed=0x000000016d6a0160, isMT=0x000000016d6a015c, progress=0x000000016d6a0170) at Lzma2DecMt.c:949:16
    frame #17: 0x0000000105116b5c PLzmaSDK-Dynamic`NCompress::NLzma2::CDecoder::Code(this=0x0000600003e71050, inStream=0x0000600000165fb0, outStream=0x0000600002fecb90, inSize=0x0000600000eefd90, outSize=0x0000600002fe9378, progress=0x0000600002fefca0) at Lzma2Decoder.cpp:152:9
    frame #18: 0x00000001050ec134 PLzmaSDK-Dynamic`NCoderMixer2::CMixerST::Code(this=0x00006000039b8780, inStreams=0x0000600000eec660, outStreams=0x000000016d6a0850, progress=0x0000600002fefca0, dataAfterEnd_Error=0x000000016d6a0c9f) at CoderMixer2.cpp:776:28
    frame #19: 0x00000001050c0654 PLzmaSDK-Dynamic`NArchive::N7z::CDecoder::Decode(this=0x000000016d6a0d10, inStream=0x00006000023fcb00, startPos=32, folders=0x000000011a5c69c8, folderIndex=0, unpackSize=0x000000016d6a0d00, outStream=0x0000600002fecb90, compressProgress=0x0000600002fefca0, inStreamMainRes=0x0000000000000000, dataAfterEnd_Error=0x000000016d6a0c9f, getTextPassword=0x000000012de94700, isEncrypted=0x000000016d6a0cb7, passwordIsDefined=0x000000016d6a0cb6, password=0x000000016d6a0ca0) at 7zDecode.cpp:557:20
    frame #20: 0x00000001050cafe8 PLzmaSDK-Dynamic`NArchive::N7z::CHandler::Extract(this=0x000000011a5c6910, indices=0x000000016d6a0f58, numItems=63, testModeSpec=0, extractCallbackSpec=0x000000012de94700) at 7zExtract.cpp:359:32
    frame #21: 0x00000001051462c4 PLzmaSDK-Dynamic`plzma::ExtractCallback::process(this=0x000000012de94700) at plzma_extract_callback.cpp:356:67
    frame #22: 0x0000000105146640 PLzmaSDK-Dynamic`plzma::ExtractCallback::process(this=0x000000012de94700, mode=0, path=0x0000600000d20020, itemsFullPath=true) at plzma_extract_callback.cpp:395:9
    frame #23: 0x0000000105137608 PLzmaSDK-Dynamic`bool plzma::DecoderImpl::process<NArchive::NExtract::NAskMode::$_0, plzma::Path const&, bool const&>(this=0x0000600003a5c280, args=0x000000016d6a1488, args=0x0000600000d20020, args=0x000000016d6a148f) at plzma_decoder_impl.hpp:104:30
    frame #24: 0x00000001051374a0 PLzmaSDK-Dynamic`plzma::DecoderImpl::extract(this=0x0000600003a5c280, path=0x0000600000d20020, usingItemsFullPath=true) at plzma_decoder_impl.cpp:105:16
    frame #25: 0x0000000105139b24 PLzmaSDK-Dynamic`::plzma_decoder_extract_all_items_to_path(decoder=0x000000016d6a1578, path=0x000000016d6a1568, items_full_path=true) at plzma_decoder_impl.cpp:290:57
    frame #26: 0x0000000105079f24 PLzmaSDK-Dynamic`Decoder.extract(path=0x0000600000d22cc0, itemsFullPath=true, self=0x0000600000d23940) at Decoder.swift:142:22

Extracting 7z sometimes crash

Hi,

Thanks for this library! I was using LzmaSDKObjC then migrated to PLzmaSDK since I was looking for SPM support (and because you deprecated the first one).

I'm now encountering a crash on a few 7z extraction, it's a bit random: some passes, others doesn't, but it's always the same stack.

Here a screenshot of the crash and the output using bt in Xcode:

Screenshot 2021-01-20 at 15 00 40

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
  * frame #0: 0x00000001111f4c9c MyFramework`plzma::RawHeapMemory::operator bool<bool>(this=0x0000000000000008) at libplzma.hpp:80:63
    frame #1: 0x00000001111fb8e6 MyFramework`plzma::String::utf8(this=0x0000000000000000) const at plzma_string.cpp:121:14
    frame #2: 0x00000001111f9da5 MyFramework`plzma::Progress::ReportData::report(this=0x00007ffedff23c68) const at plzma_progress.hpp:70:49
    frame #3: 0x00000001111fa15c MyFramework`plzma::Progress::setCompleted(this=0x0000600001ab1a40, completed=86154) at plzma_progress.cpp:151:20
    frame #4: 0x00000001111d901a MyFramework`plzma::BaseCallback::setProgressCompleted(this=0x00007ff694d0c000, completed=86154) at plzma_base_callback.cpp:94:28
    frame #5: 0x00000001111e895c MyFramework`plzma::ExtractCallback::SetCompleted(this=0x00007ff694d0c000, completeValue=0x00007ffedff23da0) at plzma_extract_callback.cpp:66:32
    frame #6: 0x00000001111af4e2 MyFramework`CLocalProgress::SetRatioInfo(this=0x0000600000815090, inSize=0x00007ffedff23e18, outSize=0x00007ff69ac5eae0) at ProgressUtils.cpp:42:23
    frame #7: 0x00000001111bc3ac MyFramework`NCompress::NLzma::CDecoder::CodeSpec(this=0x00007ff69ac5ea70, inStream=0x000060000257cfc0, outStream=0x00006000008163a0, progress=0x0000600000815090) at LzmaDecoder.cpp:207:7
    frame #8: 0x00000001111bc454 MyFramework`NCompress::NLzma::CDecoder::Code(this=0x00007ff69ac5ea70, inStream=0x000060000257cfc0, outStream=0x00006000008163a0, inSize=0x000060000298d330, outSize=0x0000600000834d88, progress=0x0000600000815090) at LzmaDecoder.cpp:219:17
    frame #9: 0x0000000111189891 MyFramework`NCoderMixer2::CMixerST::Code(this=0x0000600001e827c0, inStreams=0x000060000298d380, outStreams=0x00007ffedff24608, progress=0x0000600000815090, dataAfterEnd_Error=0x00007ffedff24a7f) at CoderMixer2.cpp:776:28
    frame #10: 0x0000000111157c1b MyFramework`NArchive::N7z::CDecoder::Decode(this=0x00007ffedff24af0, inStream=0x0000600000562400, startPos=32, folders=0x00007ff694e2c4b8, folderIndex=0, unpackSize=0x00007ffedff24ae0, outStream=0x00006000008163a0, compressProgress=0x0000600000815090, inStreamMainRes=0x0000000000000000, dataAfterEnd_Error=0x00007ffedff24a7f, getTextPassword=0x00007ff694d0c000, isEncrypted=0x00007ffedff24a97, passwordIsDefined=0x00007ffedff24a96, password=0x00007ffedff24a80) at 7zDecode.cpp:557:20
    frame #11: 0x000000011116396f MyFramework`NArchive::N7z::CHandler::Extract(this=0x00007ff694e2c400, indices=0x00007ffedff24d40, numItems=16, testModeSpec=0, extractCallbackSpec=0x00007ff694d0c000) at 7zExtract.cpp:359:32
    frame #12: 0x00000001111ea80a MyFramework`plzma::ExtractCallback::process(this=0x00007ff694d0c000) at plzma_extract_callback.cpp:339:67
    frame #13: 0x00000001111eac52 MyFramework`plzma::ExtractCallback::process(this=0x00007ff694d0c000, mode=0, path=0x0000600002bcb720, itemsFullPath=true) at plzma_extract_callback.cpp:376:9
    frame #14: 0x00000001111da946 MyFramework`bool plzma::DecoderImpl::process<NArchive::NExtract::NAskMode::$_0, plzma::Path const&, bool const&>(this=0x0000600001ab1860, args=0x00007ffedff25278, args=0x0000600002bcb720, args=0x00007ffedff2527f) at plzma_decoder_impl.hpp:87:30
    frame #15: 0x00000001111da762 MyFramework`plzma::DecoderImpl::extract(this=0x0000600001ab1860, path=0x0000600002bcb720, usingItemsFullPath=true) at plzma_decoder_impl.cpp:91:16
    frame #16: 0x00000001111dd1e9 MyFramework`::plzma_decoder_extract_all_items_to_path(decoder=0x00007ffedff253c0, path=0x00007ffedff253b0, items_full_path=true) at plzma_decoder_impl.cpp:268:57
    frame #17: 0x000000011110be7f MyFramework`Decoder.extract(path=0x0000600002bcbc80, itemsFullPath=true, self=0x0000600002b02560) at Decoder.swift:143:22
    frame #18: 0x00000001110de69e MyFramework`KitDownloader.extractArchive(archivePath="/Users/user/Library/Developer/CoreSimulator/Devices/DED1A430-584D-4171-B485-1AD70264556F/data/Containers/Data/Application/2EB1C261-43AA-4A0C-8BA9-3F26B74CDD71/Documents/JamPacks/id/jam.7z", completion=0x00000001110e2020 MyFramework`partial apply forwarder for closure #1 () -> () in KitDownloaderCommon.KitDownloader.(extractJam in _FF877985CBDE0E1D4F887358C8775D0F)(at: Foundation.URL) -> () at <compiler-generated>, self=0x0000600001abe1c0) at KitDownloader.swift:192:25
    frame #19: 0x00000001110dd596 MyFramework`KitDownloader.extractJam(location=<unavailable; try printing with "vo" or "po">, self=0x0000600001abe1c0) at KitDownloader.swift:172:17
    frame #20: 0x00000001110dd30b MyFramework`closure #2 in KitDownloader.downloadArchive(result=<invalid> (0x80), self=0x0000600001abe1c0) at KitDownloader.swift:151:22
    frame #21: 0x000000011110456b MyFramework`closure #1 in DownloadDriver.completeRequest(meta=0x00006000031a2440, result=<invalid> (0x80)) at DownloadDriver.swift:105:18
    frame #22: 0x0000000111103250 MyFramework`thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0
    frame #23: 0x0000000115d597ec libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #24: 0x0000000115d5a9c8 libdispatch.dylib`_dispatch_client_callout + 8
    frame #25: 0x0000000115d68e75 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1152
    frame #26: 0x00007fff2038edbb CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #27: 0x00007fff2038963e CoreFoundation`__CFRunLoopRun + 2685
    frame #28: 0x00007fff203886d6 CoreFoundation`CFRunLoopRunSpecific + 567
    frame #29: 0x00007fff2bededb3 GraphicsServices`GSEventRunModal + 139
    frame #30: 0x00007fff24690e0b UIKitCore`-[UIApplication _run] + 912
    frame #31: 0x00007fff24695cbc UIKitCore`UIApplicationMain + 101
    frame #32: 0x000000010fe00b68 MyApp`main at AppDelegate.swift:7:7
    frame #33: 0x00007fff202593e9 libdyld.dylib`start + 1

and here how we use PLzmaSDK, it's more or less what you put in the README:

        let archivePath = try Path(archivePath)
        let archivePathInStream = try InStream(path: archivePath)
        let decoder = try Decoder(stream: archivePathInStream, fileType: .sevenZ, delegate: self)

        let password = "..."
        try decoder.setPassword(password)
        _ = try decoder.open()

        let outputPath = ...
        _ = try decoder.extract(to: Path(outputPath))

Since the archive has sensible data I can't share it here, but what can I add to help you identify the issue? Did I miss something?

Build issues in Catalina with Xcode 12

I imported the Swift package using the git url -
https://github.com/OlehKulykov/PLzmaSDK.git

I get this build error -
The package product 'PLzmaSDK-Static' cannot be used as a dependency of this target because it uses unsafe build flags.

Xcode 12.4 and Catalina 10.15.7

File's creation and modified dates are set to decompressed date

Hi!
File's creation and modified dates are wring and set to decompressed date so each decompressing iteration gives the different creation and modified date. How to get original creation and modified date of the decompressed files?

I decompress files as
plzma_decoder_extract_all_items_to_path(&decoder, &pathObject, itemsFullPath)

then I read dates from files attributes
try fileManager.attributesOfItem(atPath: path.path)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.