GithubHelp home page GithubHelp logo

jhuix / lib7zres Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 1.85 MB

The lib7zres project is a library that reads 7z compressed files as resource packages.

License: MIT License

C++ 65.79% Assembly 1.49% C 24.52% Makefile 0.97% Objective-C 0.01% C# 4.10% Java 3.11% Batchfile 0.01%
lib7zres 7z 7zip sevenzip lzma lzma2 7zres res

lib7zres's Introduction

Lib7zres

lib7zres 工程是一读取由7z压缩文件做为资源包的库。

7z-LZMA SDK

7z文件分析和解压缩采用 7Zip 的解压缩LZMA SDK开源版本源码。

Example

1. 获取一个test.7z资源包里的名为"skin\ui\index.html"的内容至缓存中:

JRES::IRes* jres = SEVENZRES::Create7zRes(true);
if (jres) {
    if (jres->Open("test.7z", '\\')) {
        char* buf = nullptr;
        size_t bufsize = 0;
        void* res = jres->LoadResource("skin\\ui\\index.html", &buf, bufsize);
        if (res) {
            //TO DO USE data of "buf"
            rarres->FreeResource(res);
        }
    }
    jres->Release();
}

2. 在windows平台下,获取一个test.7z"skin/img/caotion.png"的内容至IStream中:

JRES::IRes* jres = SEVENZRES::Create7zRes(true);
if (jres) {
    if (jres->Open("test.7z", 0)) {
        IStream* res = jres->LoadResource("skin/img/caotion.png");
        if (res) {
            //TO DO USE IStream interface methods of "res";
            //For examples: <Seek>|<Read>|<Write> methods etc.
            res->Release();
        }
    }
    jres->Release();
}

License

MIT

Copyright (c) 2018-present, Jhuix (Hui Jin)

lib7zres's People

Contributors

jhuix avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lib7zres's Issues

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.