mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 11:34:05 +00:00
3858932ec4
* feat!: add libzim dependency * 🎨 apply clang-format changes * action: add libzim dependency to action * feat!: change dependency folder * action: add zim support * feat!: add libzim support * action: fix sonarcloud check * doc: add libzim readme * action: cmake build * action: cmake check * fix: code smell * action: cmake check * action: cmake on Macos * action: cmake on Macos * feat: use libzim to read title and description * 🎨 apply clang-format changes * feat: split zim file support * feat: loadArticle refactor * 🎨 apply clang-format changes * 🎨 apply clang-format changes * feat: update library and goldendict.pro * 🎨 apply clang-format changes * fix:word count * 🎨 apply clang-format changes * fix: video src url subsititue * 🎨 apply clang-format changes * zim: headword is not usually a valid it is from title and url. * fix: remove nested try catch * zim: fix resource loading issue. * 🎨 apply clang-format changes * action: remove libao * zim: process url some old zim dictionary url does not contain namespace such as /C/url make the old and new zim dictionary's url consistent without the leading ../C/ etc. * 🎨 apply clang-format changes * zim: process url remove leading dot and slash such as ../-/assets ,remove ../ * 🎨 apply clang-format changes * zim: remove resourceIndex creation use libzim to read the resource directly. * zim: only iterate all the articles * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes * zim: refactor method to convert url to wstring * 🎨 apply clang-format changes * fix:code smell * 🎨 apply clang-format changes * zim: update windows dependencies * zim: add mutex lock * 🎨 apply clang-format changes * fix: code smell * 🎨 apply clang-format changes --------- Co-authored-by: xiaoyifang <xiaoyifang@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
95 lines
2.7 KiB
C
95 lines
2.7 KiB
C
/**
|
|
* \file lzma/bcj.h
|
|
* \brief Branch/Call/Jump conversion filters
|
|
*/
|
|
|
|
/*
|
|
* Author: Lasse Collin
|
|
*
|
|
* This file has been put into the public domain.
|
|
* You can do whatever you want with this file.
|
|
*
|
|
* See ../lzma.h for information about liblzma as a whole.
|
|
*/
|
|
|
|
#ifndef LZMA_H_INTERNAL
|
|
# error Never include this file directly. Use <lzma.h> instead.
|
|
#endif
|
|
|
|
|
|
/* Filter IDs for lzma_filter.id */
|
|
|
|
#define LZMA_FILTER_X86 LZMA_VLI_C(0x04)
|
|
/**<
|
|
* Filter for x86 binaries
|
|
*/
|
|
|
|
#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
|
|
/**<
|
|
* Filter for Big endian PowerPC binaries
|
|
*/
|
|
|
|
#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
|
|
/**<
|
|
* Filter for IA-64 (Itanium) binaries.
|
|
*/
|
|
|
|
#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
|
|
/**<
|
|
* Filter for ARM binaries.
|
|
*/
|
|
|
|
#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
|
|
/**<
|
|
* Filter for ARM-Thumb binaries.
|
|
*/
|
|
|
|
#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
|
|
/**<
|
|
* Filter for SPARC binaries.
|
|
*/
|
|
|
|
#define LZMA_FILTER_ARM64 LZMA_VLI_C( 0x0A )
|
|
/**<
|
|
* Filter for ARM64 binaries.
|
|
*/
|
|
|
|
/**
|
|
* \brief Options for BCJ filters (except ARM64)
|
|
*
|
|
* The BCJ filters never change the size of the data. Specifying options
|
|
* for them is optional: if pointer to options is NULL, default value is
|
|
* used. You probably never need to specify options to BCJ filters, so just
|
|
* set the options pointer to NULL and be happy.
|
|
*
|
|
* If options with non-default values have been specified when encoding,
|
|
* the same options must also be specified when decoding.
|
|
*
|
|
* \note At the moment, none of the BCJ filters support
|
|
* LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified,
|
|
* LZMA_OPTIONS_ERROR will be returned. If there is need,
|
|
* partial support for LZMA_SYNC_FLUSH can be added in future.
|
|
* Partial means that flushing would be possible only at
|
|
* offsets that are multiple of 2, 4, or 16 depending on
|
|
* the filter, except x86 which cannot be made to support
|
|
* LZMA_SYNC_FLUSH predictably.
|
|
*/
|
|
typedef struct {
|
|
/**
|
|
* \brief Start offset for conversions
|
|
*
|
|
* This setting is useful only when the same filter is used
|
|
* _separately_ for multiple sections of the same executable file,
|
|
* and the sections contain cross-section branch/call/jump
|
|
* instructions. In that case it is beneficial to set the start
|
|
* offset of the non-first sections so that the relative addresses
|
|
* of the cross-section branch/call/jump instructions will use the
|
|
* same absolute addresses as in the first section.
|
|
*
|
|
* When the pointer to options is NULL, the default value (zero)
|
|
* is used.
|
|
*/
|
|
uint32_t start_offset;
|
|
|
|
} lzma_options_bcj;
|