diff --git a/SECURITY.md b/SECURITY.md
index 1d0b16e..a07c25b 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -10,4 +10,5 @@
| < 4.0 | :x: |
## Reporting a Vulnerability
+
Go to Issues Report a Vulnerability
diff --git a/api.js b/api.js
index 6854d0a..85882a9 100644
--- a/api.js
+++ b/api.js
@@ -1,5 +1,5 @@
// Ensure 'serverApi' is declared only once
const serverApi = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/block-css-value.js b/block-css-value.js
index 38bbe57..ea2b889 100644
--- a/block-css-value.js
+++ b/block-css-value.js
@@ -1,5 +1,5 @@
// Ensure 'BLOCK_CSS_VALUE' is declared only once
const BLOCK_CSS_VALUE = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/block-types.js b/block-types.js
index d4b6ced..db5f45a 100644
--- a/block-types.js
+++ b/block-types.js
@@ -1,5 +1,5 @@
// Ensure 'BLOCK_TYPES' is declared only once
const BLOCK_TYPES = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/browser-info.js b/browser-info.js
index b637040..3e82012 100644
--- a/browser-info.js
+++ b/browser-info.js
@@ -1,5 +1,5 @@
// Ensure 'BrowserInfo' is declared only once
const BrowserInfo = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/debug.js b/debug.js
index 5ae8d5f..6dbb8e0 100644
--- a/debug.js
+++ b/debug.js
@@ -1,4 +1,4 @@
// Ensure 'debug' is declared only once
const debug = (message) => {
- console.log(message);
+ console.log(message);
};
diff --git a/dialog.js b/dialog.js
index 38030db..6ffafe9 100644
--- a/dialog.js
+++ b/dialog.js
@@ -1,6 +1 @@
-
-
-
-
-
-// ...existing code...}; // ...existing code...const Dialog = {
\ No newline at end of file
+// ...existing code...}; // ...existing code...const Dialog = {
diff --git a/helpers.js b/helpers.js
index 03443b1..2531008 100644
--- a/helpers.js
+++ b/helpers.js
@@ -1,5 +1,5 @@
// Ensure 'guidSeed' is declared only once
const guidSeed = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/icon-badge-periods.js b/icon-badge-periods.js
index 3b25b53..aac9f83 100644
--- a/icon-badge-periods.js
+++ b/icon-badge-periods.js
@@ -1,5 +1,5 @@
// Ensure 'ICON_BADGE_PERIODS' is declared only once
const ICON_BADGE_PERIODS = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/index.html b/index.html
index d1f4ad7..d4d3800 100644
--- a/index.html
+++ b/index.html
@@ -1,46 +1,49 @@
-
+
-
-
-
+
+
+
AI-Powered Toolbox
-
-
-
+
+
+
-
AI-Powered Online Toolbox
-
Your go-to tools enhanced by Artificial Intelligence for networking and IP-related tasks.
+
AI-Powered Online Toolbox
+
+ Your go-to tools enhanced by Artificial Intelligence for networking and
+ IP-related tasks.
+
-
-
-
What's My IP Address
-
-
Your IP will appear here.
-
-
-
IP Lookup / Geolocation
-
-
-
Results will appear here.
-
-
-
Internet Speed Test
-
-
Speed test results will appear here.
-
-
-
Ping
-
-
-
Ping results will appear here.
-
-
-
+
+
+
What's My IP Address
+
+
Your IP will appear here.
+
+
+
IP Lookup / Geolocation
+
+
+
Results will appear here.
+
+
+
Internet Speed Test
+
+
Speed test results will appear here.
+
+
+
Ping
+
+
+
Ping results will appear here.
+
+
+
-
+
diff --git a/message-types.js b/message-types.js
index fc338c2..5e83433 100644
--- a/message-types.js
+++ b/message-types.js
@@ -1,5 +1,5 @@
// Ensure 'MESSAGE_TYPES' is declared only once
const MESSAGE_TYPES = {
- // ...existing code...
+ // ...existing code...
};
// ...existing code...
diff --git a/node_modules/lzma-native/deps/include/lzma.h b/node_modules/lzma-native/deps/include/lzma.h
index 7d0bdc7..4b42bce 100644
--- a/node_modules/lzma-native/deps/include/lzma.h
+++ b/node_modules/lzma-native/deps/include/lzma.h
@@ -69,101 +69,100 @@
*/
#ifndef LZMA_MANUAL_HEADERS
- /*
- * I suppose this works portably also in C++. Note that in C++,
- * we need to get size_t into the global namespace.
- */
-# include
-
- /*
- * Skip inttypes.h if we already have all the required macros. If we
- * have the macros, we assume that we have the matching typedefs too.
- */
-# if !defined(UINT32_C) || !defined(UINT64_C) \
- || !defined(UINT32_MAX) || !defined(UINT64_MAX)
- /*
- * MSVC versions older than 2013 have no C99 support, and
- * thus they cannot be used to compile liblzma. Using an
- * existing liblzma.dll with old MSVC can work though(*),
- * but we need to define the required standard integer
- * types here in a MSVC-specific way.
- *
- * (*) If you do this, the existing liblzma.dll probably uses
- * a different runtime library than your MSVC-built
- * application. Mixing runtimes is generally bad, but
- * in this case it should work as long as you avoid
- * the few rarely-needed liblzma functions that allocate
- * memory and expect the caller to free it using free().
- */
-# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int32 uint32_t;
- typedef unsigned __int64 uint64_t;
-# else
- /* Use the standard inttypes.h. */
-# ifdef __cplusplus
- /*
- * C99 sections 7.18.2 and 7.18.4 specify
- * that C++ implementations define the limit
- * and constant macros only if specifically
- * requested. Note that if you want the
- * format macros (PRIu64 etc.) too, you need
- * to define __STDC_FORMAT_MACROS before
- * including lzma.h, since re-including
- * inttypes.h with __STDC_FORMAT_MACROS
- * defined doesn't necessarily work.
- */
-# ifndef __STDC_LIMIT_MACROS
-# define __STDC_LIMIT_MACROS 1
-# endif
-# ifndef __STDC_CONSTANT_MACROS
-# define __STDC_CONSTANT_MACROS 1
-# endif
-# endif
-
-# include
-# endif
-
- /*
- * Some old systems have only the typedefs in inttypes.h, and
- * lack all the macros. For those systems, we need a few more
- * hacks. We assume that unsigned int is 32-bit and unsigned
- * long is either 32-bit or 64-bit. If these hacks aren't
- * enough, the application has to setup the types manually
- * before including lzma.h.
- */
-# ifndef UINT32_C
-# if defined(_WIN32) && defined(_MSC_VER)
-# define UINT32_C(n) n ## UI32
-# else
-# define UINT32_C(n) n ## U
-# endif
-# endif
-
-# ifndef UINT64_C
-# if defined(_WIN32) && defined(_MSC_VER)
-# define UINT64_C(n) n ## UI64
-# else
- /* Get ULONG_MAX. */
-# include
-# if ULONG_MAX == 4294967295UL
-# define UINT64_C(n) n ## ULL
-# else
-# define UINT64_C(n) n ## UL
-# endif
-# endif
-# endif
-
-# ifndef UINT32_MAX
-# define UINT32_MAX (UINT32_C(4294967295))
-# endif
-
-# ifndef UINT64_MAX
-# define UINT64_MAX (UINT64_C(18446744073709551615))
-# endif
-# endif
-#endif /* ifdef LZMA_MANUAL_HEADERS */
+/*
+ * I suppose this works portably also in C++. Note that in C++,
+ * we need to get size_t into the global namespace.
+ */
+#include
+
+/*
+ * Skip inttypes.h if we already have all the required macros. If we
+ * have the macros, we assume that we have the matching typedefs too.
+ */
+#if !defined(UINT32_C) || !defined(UINT64_C) || !defined(UINT32_MAX) || \
+ !defined(UINT64_MAX)
+/*
+ * MSVC versions older than 2013 have no C99 support, and
+ * thus they cannot be used to compile liblzma. Using an
+ * existing liblzma.dll with old MSVC can work though(*),
+ * but we need to define the required standard integer
+ * types here in a MSVC-specific way.
+ *
+ * (*) If you do this, the existing liblzma.dll probably uses
+ * a different runtime library than your MSVC-built
+ * application. Mixing runtimes is generally bad, but
+ * in this case it should work as long as you avoid
+ * the few rarely-needed liblzma functions that allocate
+ * memory and expect the caller to free it using free().
+ */
+#if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+#else
+/* Use the standard inttypes.h. */
+#ifdef __cplusplus
+/*
+ * C99 sections 7.18.2 and 7.18.4 specify
+ * that C++ implementations define the limit
+ * and constant macros only if specifically
+ * requested. Note that if you want the
+ * format macros (PRIu64 etc.) too, you need
+ * to define __STDC_FORMAT_MACROS before
+ * including lzma.h, since re-including
+ * inttypes.h with __STDC_FORMAT_MACROS
+ * defined doesn't necessarily work.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+#ifndef __STDC_CONSTANT_MACROS
+#define __STDC_CONSTANT_MACROS 1
+#endif
+#endif
+
+#include
+#endif
+
+/*
+ * Some old systems have only the typedefs in inttypes.h, and
+ * lack all the macros. For those systems, we need a few more
+ * hacks. We assume that unsigned int is 32-bit and unsigned
+ * long is either 32-bit or 64-bit. If these hacks aren't
+ * enough, the application has to setup the types manually
+ * before including lzma.h.
+ */
+#ifndef UINT32_C
+#if defined(_WIN32) && defined(_MSC_VER)
+#define UINT32_C(n) n##UI32
+#else
+#define UINT32_C(n) n##U
+#endif
+#endif
+
+#ifndef UINT64_C
+#if defined(_WIN32) && defined(_MSC_VER)
+#define UINT64_C(n) n##UI64
+#else
+/* Get ULONG_MAX. */
+#include
+#if ULONG_MAX == 4294967295UL
+#define UINT64_C(n) n##ULL
+#else
+#define UINT64_C(n) n##UL
+#endif
+#endif
+#endif
+
+#ifndef UINT32_MAX
+#define UINT32_MAX (UINT32_C(4294967295))
+#endif
+#ifndef UINT64_MAX
+#define UINT64_MAX (UINT64_C(18446744073709551615))
+#endif
+#endif
+#endif /* ifdef LZMA_MANUAL_HEADERS */
/******************
* LZMA_API macro *
@@ -188,26 +187,25 @@
* omitted on Cygwin but not on MinGW.
*/
#ifndef LZMA_API_IMPORT
-# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
-# define LZMA_API_IMPORT __declspec(dllimport)
-# else
-# define LZMA_API_IMPORT
-# endif
+#if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
+#define LZMA_API_IMPORT __declspec(dllimport)
+#else
+#define LZMA_API_IMPORT
+#endif
#endif
#ifndef LZMA_API_CALL
-# if defined(_WIN32) && !defined(__CYGWIN__)
-# define LZMA_API_CALL __cdecl
-# else
-# define LZMA_API_CALL
-# endif
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#define LZMA_API_CALL __cdecl
+#else
+#define LZMA_API_CALL
+#endif
#endif
#ifndef LZMA_API
-# define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
+#define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
#endif
-
/***********
* nothrow *
***********/
@@ -218,15 +216,14 @@
* because liblzma would break if a callback function threw an exception.
*/
#ifndef lzma_nothrow
-# if defined(__cplusplus)
-# define lzma_nothrow throw()
-# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-# define lzma_nothrow __attribute__((__nothrow__))
-# else
-# define lzma_nothrow
-# endif
+#if defined(__cplusplus)
+#define lzma_nothrow throw()
+#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+#define lzma_nothrow __attribute__((__nothrow__))
+#else
+#define lzma_nothrow
+#endif
#endif
-
/********************
* GNU C extensions *
@@ -238,38 +235,35 @@
* affects warnings and optimizations.
*/
#if __GNUC__ >= 3
-# ifndef lzma_attribute
-# define lzma_attribute(attr) __attribute__(attr)
-# endif
+#ifndef lzma_attribute
+#define lzma_attribute(attr) __attribute__(attr)
+#endif
- /* warn_unused_result was added in GCC 3.4. */
-# ifndef lzma_attr_warn_unused_result
-# if __GNUC__ == 3 && __GNUC_MINOR__ < 4
-# define lzma_attr_warn_unused_result
-# endif
-# endif
+/* warn_unused_result was added in GCC 3.4. */
+#ifndef lzma_attr_warn_unused_result
+#if __GNUC__ == 3 && __GNUC_MINOR__ < 4
+#define lzma_attr_warn_unused_result
+#endif
+#endif
#else
-# ifndef lzma_attribute
-# define lzma_attribute(attr)
-# endif
+#ifndef lzma_attribute
+#define lzma_attribute(attr)
+#endif
#endif
-
#ifndef lzma_attr_pure
-# define lzma_attr_pure lzma_attribute((__pure__))
+#define lzma_attr_pure lzma_attribute((__pure__))
#endif
#ifndef lzma_attr_const
-# define lzma_attr_const lzma_attribute((__const__))
+#define lzma_attr_const lzma_attribute((__const__))
#endif
#ifndef lzma_attr_warn_unused_result
-# define lzma_attr_warn_unused_result \
- lzma_attribute((__warn_unused_result__))
+#define lzma_attr_warn_unused_result lzma_attribute((__warn_unused_result__))
#endif
-
/**************
* Subheaders *
**************/
@@ -285,25 +279,25 @@ extern "C" {
#define LZMA_H_INTERNAL 1
/* Basic features */
-#include "lzma/version.h"
#include "lzma/base.h"
-#include "lzma/vli.h"
#include "lzma/check.h"
+#include "lzma/version.h"
+#include "lzma/vli.h"
/* Filters */
-#include "lzma/filter.h"
#include "lzma/bcj.h"
#include "lzma/delta.h"
+#include "lzma/filter.h"
#include "lzma/lzma12.h"
/* Container formats */
#include "lzma/container.h"
/* Advanced features */
-#include "lzma/stream_flags.h"
#include "lzma/block.h"
#include "lzma/index.h"
#include "lzma/index_hash.h"
+#include "lzma/stream_flags.h"
/* Hardware information */
#include "lzma/hardware.h"
diff --git a/node_modules/lzma-native/deps/include/lzma/base.h b/node_modules/lzma-native/deps/include/lzma/base.h
index e0405a2..76bdbfb 100644
--- a/node_modules/lzma-native/deps/include/lzma/base.h
+++ b/node_modules/lzma-native/deps/include/lzma/base.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Boolean
*
@@ -28,7 +27,6 @@
*/
typedef unsigned char lzma_bool;
-
/**
* \brief Type of reserved enumeration variable in structures
*
@@ -41,10 +39,7 @@ typedef unsigned char lzma_bool;
* than 128, which should guarantee that the ABI won't break even when
* new constants are added to existing enumerations.
*/
-typedef enum {
- LZMA_RESERVED_ENUM = 0
-} lzma_reserved_enum;
-
+typedef enum { LZMA_RESERVED_ENUM = 0 } lzma_reserved_enum;
/**
* \brief Return values used by several functions in liblzma
@@ -55,188 +50,187 @@ typedef enum {
* described per-function basis.
*/
typedef enum {
- LZMA_OK = 0,
- /**<
- * \brief Operation completed successfully
- */
-
- LZMA_STREAM_END = 1,
- /**<
- * \brief End of stream was reached
- *
- * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
- * LZMA_FINISH was finished. In decoder, this indicates
- * that all the data was successfully decoded.
- *
- * In all cases, when LZMA_STREAM_END is returned, the last
- * output bytes should be picked from strm->next_out.
- */
-
- LZMA_NO_CHECK = 2,
- /**<
- * \brief Input stream has no integrity check
- *
- * This return value can be returned only if the
- * LZMA_TELL_NO_CHECK flag was used when initializing
- * the decoder. LZMA_NO_CHECK is just a warning, and
- * the decoding can be continued normally.
- *
- * It is possible to call lzma_get_check() immediately after
- * lzma_code has returned LZMA_NO_CHECK. The result will
- * naturally be LZMA_CHECK_NONE, but the possibility to call
- * lzma_get_check() may be convenient in some applications.
- */
-
- LZMA_UNSUPPORTED_CHECK = 3,
- /**<
- * \brief Cannot calculate the integrity check
- *
- * The usage of this return value is different in encoders
- * and decoders.
- *
- * Encoders can return this value only from the initialization
- * function. If initialization fails with this value, the
- * encoding cannot be done, because there's no way to produce
- * output with the correct integrity check.
- *
- * Decoders can return this value only from lzma_code() and
- * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
- * initializing the decoder. The decoding can still be
- * continued normally even if the check type is unsupported,
- * but naturally the check will not be validated, and possible
- * errors may go undetected.
- *
- * With decoder, it is possible to call lzma_get_check()
- * immediately after lzma_code() has returned
- * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
- * out what the unsupported Check ID was.
- */
-
- LZMA_GET_CHECK = 4,
- /**<
- * \brief Integrity check type is now available
- *
- * This value can be returned only by the lzma_code() function
- * and only if the decoder was initialized with the
- * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
- * application that it may now call lzma_get_check() to find
- * out the Check ID. This can be used, for example, to
- * implement a decoder that accepts only files that have
- * strong enough integrity check.
- */
-
- LZMA_MEM_ERROR = 5,
- /**<
- * \brief Cannot allocate memory
- *
- * Memory allocation failed, or the size of the allocation
- * would be greater than SIZE_MAX.
- *
- * Due to internal implementation reasons, the coding cannot
- * be continued even if more memory were made available after
- * LZMA_MEM_ERROR.
- */
-
- LZMA_MEMLIMIT_ERROR = 6,
- /**
- * \brief Memory usage limit was reached
- *
- * Decoder would need more memory than allowed by the
- * specified memory usage limit. To continue decoding,
- * the memory usage limit has to be increased with
- * lzma_memlimit_set().
- */
-
- LZMA_FORMAT_ERROR = 7,
- /**<
- * \brief File format not recognized
- *
- * The decoder did not recognize the input as supported file
- * format. This error can occur, for example, when trying to
- * decode .lzma format file with lzma_stream_decoder,
- * because lzma_stream_decoder accepts only the .xz format.
- */
-
- LZMA_OPTIONS_ERROR = 8,
- /**<
- * \brief Invalid or unsupported options
- *
- * Invalid or unsupported options, for example
- * - unsupported filter(s) or filter options; or
- * - reserved bits set in headers (decoder only).
- *
- * Rebuilding liblzma with more features enabled, or
- * upgrading to a newer version of liblzma may help.
- */
-
- LZMA_DATA_ERROR = 9,
- /**<
- * \brief Data is corrupt
- *
- * The usage of this return value is different in encoders
- * and decoders. In both encoder and decoder, the coding
- * cannot continue after this error.
- *
- * Encoders return this if size limits of the target file
- * format would be exceeded. These limits are huge, thus
- * getting this error from an encoder is mostly theoretical.
- * For example, the maximum compressed and uncompressed
- * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
- *
- * Decoders return this error if the input data is corrupt.
- * This can mean, for example, invalid CRC32 in headers
- * or invalid check of uncompressed data.
- */
-
- LZMA_BUF_ERROR = 10,
- /**<
- * \brief No progress is possible
- *
- * This error code is returned when the coder cannot consume
- * any new input and produce any new output. The most common
- * reason for this error is that the input stream being
- * decoded is truncated or corrupt.
- *
- * This error is not fatal. Coding can be continued normally
- * by providing more input and/or more output space, if
- * possible.
- *
- * Typically the first call to lzma_code() that can do no
- * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
- * the second consecutive call doing no progress will return
- * LZMA_BUF_ERROR. This is intentional.
- *
- * With zlib, Z_BUF_ERROR may be returned even if the
- * application is doing nothing wrong, so apps will need
- * to handle Z_BUF_ERROR specially. The above hack
- * guarantees that liblzma never returns LZMA_BUF_ERROR
- * to properly written applications unless the input file
- * is truncated or corrupt. This should simplify the
- * applications a little.
- */
-
- LZMA_PROG_ERROR = 11,
- /**<
- * \brief Programming error
- *
- * This indicates that the arguments given to the function are
- * invalid or the internal state of the decoder is corrupt.
- * - Function arguments are invalid or the structures
- * pointed by the argument pointers are invalid
- * e.g. if strm->next_out has been set to NULL and
- * strm->avail_out > 0 when calling lzma_code().
- * - lzma_* functions have been called in wrong order
- * e.g. lzma_code() was called right after lzma_end().
- * - If errors occur randomly, the reason might be flaky
- * hardware.
- *
- * If you think that your code is correct, this error code
- * can be a sign of a bug in liblzma. See the documentation
- * how to report bugs.
- */
+ LZMA_OK = 0,
+ /**<
+ * \brief Operation completed successfully
+ */
+
+ LZMA_STREAM_END = 1,
+ /**<
+ * \brief End of stream was reached
+ *
+ * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
+ * LZMA_FINISH was finished. In decoder, this indicates
+ * that all the data was successfully decoded.
+ *
+ * In all cases, when LZMA_STREAM_END is returned, the last
+ * output bytes should be picked from strm->next_out.
+ */
+
+ LZMA_NO_CHECK = 2,
+ /**<
+ * \brief Input stream has no integrity check
+ *
+ * This return value can be returned only if the
+ * LZMA_TELL_NO_CHECK flag was used when initializing
+ * the decoder. LZMA_NO_CHECK is just a warning, and
+ * the decoding can be continued normally.
+ *
+ * It is possible to call lzma_get_check() immediately after
+ * lzma_code has returned LZMA_NO_CHECK. The result will
+ * naturally be LZMA_CHECK_NONE, but the possibility to call
+ * lzma_get_check() may be convenient in some applications.
+ */
+
+ LZMA_UNSUPPORTED_CHECK = 3,
+ /**<
+ * \brief Cannot calculate the integrity check
+ *
+ * The usage of this return value is different in encoders
+ * and decoders.
+ *
+ * Encoders can return this value only from the initialization
+ * function. If initialization fails with this value, the
+ * encoding cannot be done, because there's no way to produce
+ * output with the correct integrity check.
+ *
+ * Decoders can return this value only from lzma_code() and
+ * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
+ * initializing the decoder. The decoding can still be
+ * continued normally even if the check type is unsupported,
+ * but naturally the check will not be validated, and possible
+ * errors may go undetected.
+ *
+ * With decoder, it is possible to call lzma_get_check()
+ * immediately after lzma_code() has returned
+ * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
+ * out what the unsupported Check ID was.
+ */
+
+ LZMA_GET_CHECK = 4,
+ /**<
+ * \brief Integrity check type is now available
+ *
+ * This value can be returned only by the lzma_code() function
+ * and only if the decoder was initialized with the
+ * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
+ * application that it may now call lzma_get_check() to find
+ * out the Check ID. This can be used, for example, to
+ * implement a decoder that accepts only files that have
+ * strong enough integrity check.
+ */
+
+ LZMA_MEM_ERROR = 5,
+ /**<
+ * \brief Cannot allocate memory
+ *
+ * Memory allocation failed, or the size of the allocation
+ * would be greater than SIZE_MAX.
+ *
+ * Due to internal implementation reasons, the coding cannot
+ * be continued even if more memory were made available after
+ * LZMA_MEM_ERROR.
+ */
+
+ LZMA_MEMLIMIT_ERROR = 6,
+ /**
+ * \brief Memory usage limit was reached
+ *
+ * Decoder would need more memory than allowed by the
+ * specified memory usage limit. To continue decoding,
+ * the memory usage limit has to be increased with
+ * lzma_memlimit_set().
+ */
+
+ LZMA_FORMAT_ERROR = 7,
+ /**<
+ * \brief File format not recognized
+ *
+ * The decoder did not recognize the input as supported file
+ * format. This error can occur, for example, when trying to
+ * decode .lzma format file with lzma_stream_decoder,
+ * because lzma_stream_decoder accepts only the .xz format.
+ */
+
+ LZMA_OPTIONS_ERROR = 8,
+ /**<
+ * \brief Invalid or unsupported options
+ *
+ * Invalid or unsupported options, for example
+ * - unsupported filter(s) or filter options; or
+ * - reserved bits set in headers (decoder only).
+ *
+ * Rebuilding liblzma with more features enabled, or
+ * upgrading to a newer version of liblzma may help.
+ */
+
+ LZMA_DATA_ERROR = 9,
+ /**<
+ * \brief Data is corrupt
+ *
+ * The usage of this return value is different in encoders
+ * and decoders. In both encoder and decoder, the coding
+ * cannot continue after this error.
+ *
+ * Encoders return this if size limits of the target file
+ * format would be exceeded. These limits are huge, thus
+ * getting this error from an encoder is mostly theoretical.
+ * For example, the maximum compressed and uncompressed
+ * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
+ *
+ * Decoders return this error if the input data is corrupt.
+ * This can mean, for example, invalid CRC32 in headers
+ * or invalid check of uncompressed data.
+ */
+
+ LZMA_BUF_ERROR = 10,
+ /**<
+ * \brief No progress is possible
+ *
+ * This error code is returned when the coder cannot consume
+ * any new input and produce any new output. The most common
+ * reason for this error is that the input stream being
+ * decoded is truncated or corrupt.
+ *
+ * This error is not fatal. Coding can be continued normally
+ * by providing more input and/or more output space, if
+ * possible.
+ *
+ * Typically the first call to lzma_code() that can do no
+ * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
+ * the second consecutive call doing no progress will return
+ * LZMA_BUF_ERROR. This is intentional.
+ *
+ * With zlib, Z_BUF_ERROR may be returned even if the
+ * application is doing nothing wrong, so apps will need
+ * to handle Z_BUF_ERROR specially. The above hack
+ * guarantees that liblzma never returns LZMA_BUF_ERROR
+ * to properly written applications unless the input file
+ * is truncated or corrupt. This should simplify the
+ * applications a little.
+ */
+
+ LZMA_PROG_ERROR = 11,
+ /**<
+ * \brief Programming error
+ *
+ * This indicates that the arguments given to the function are
+ * invalid or the internal state of the decoder is corrupt.
+ * - Function arguments are invalid or the structures
+ * pointed by the argument pointers are invalid
+ * e.g. if strm->next_out has been set to NULL and
+ * strm->avail_out > 0 when calling lzma_code().
+ * - lzma_* functions have been called in wrong order
+ * e.g. lzma_code() was called right after lzma_end().
+ * - If errors occur randomly, the reason might be flaky
+ * hardware.
+ *
+ * If you think that your code is correct, this error code
+ * can be a sign of a bug in liblzma. See the documentation
+ * how to report bugs.
+ */
} lzma_ret;
-
/**
* \brief The `action' argument for lzma_code()
*
@@ -248,103 +242,102 @@ typedef enum {
* will make lzma_code() return LZMA_PROG_ERROR.
*/
typedef enum {
- LZMA_RUN = 0,
- /**<
- * \brief Continue coding
- *
- * Encoder: Encode as much input as possible. Some internal
- * buffering will probably be done (depends on the filter
- * chain in use), which causes latency: the input used won't
- * usually be decodeable from the output of the same
- * lzma_code() call.
- *
- * Decoder: Decode as much input as possible and produce as
- * much output as possible.
- */
-
- LZMA_SYNC_FLUSH = 1,
- /**<
- * \brief Make all the input available at output
- *
- * Normally the encoder introduces some latency.
- * LZMA_SYNC_FLUSH forces all the buffered data to be
- * available at output without resetting the internal
- * state of the encoder. This way it is possible to use
- * compressed stream for example for communication over
- * network.
- *
- * Only some filters support LZMA_SYNC_FLUSH. Trying to use
- * LZMA_SYNC_FLUSH with filters that don't support it will
- * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
- * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
- *
- * Using LZMA_SYNC_FLUSH very often can dramatically reduce
- * the compression ratio. With some filters (for example,
- * LZMA2), fine-tuning the compression options may help
- * mitigate this problem significantly (for example,
- * match finder with LZMA2).
- *
- * Decoders don't support LZMA_SYNC_FLUSH.
- */
-
- LZMA_FULL_FLUSH = 2,
- /**<
- * \brief Finish encoding of the current Block
- *
- * All the input data going to the current Block must have
- * been given to the encoder (the last bytes can still be
- * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH
- * until it returns LZMA_STREAM_END. Then continue normally
- * with LZMA_RUN or finish the Stream with LZMA_FINISH.
- *
- * This action is currently supported only by Stream encoder
- * and easy encoder (which uses Stream encoder). If there is
- * no unfinished Block, no empty Block is created.
- */
-
- LZMA_FULL_BARRIER = 4,
- /**<
- * \brief Finish encoding of the current Block
- *
- * This is like LZMA_FULL_FLUSH except that this doesn't
- * necessarily wait until all the input has been made
- * available via the output buffer. That is, lzma_code()
- * might return LZMA_STREAM_END as soon as all the input
- * has been consumed (avail_in == 0).
- *
- * LZMA_FULL_BARRIER is useful with a threaded encoder if
- * one wants to split the .xz Stream into Blocks at specific
- * offsets but doesn't care if the output isn't flushed
- * immediately. Using LZMA_FULL_BARRIER allows keeping
- * the threads busy while LZMA_FULL_FLUSH would make
- * lzma_code() wait until all the threads have finished
- * until more data could be passed to the encoder.
- *
- * With a lzma_stream initialized with the single-threaded
- * lzma_stream_encoder() or lzma_easy_encoder(),
- * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.
- */
-
- LZMA_FINISH = 3
- /**<
- * \brief Finish the coding operation
- *
- * All the input data must have been given to the encoder
- * (the last bytes can still be pending in next_in).
- * Call lzma_code() with LZMA_FINISH until it returns
- * LZMA_STREAM_END. Once LZMA_FINISH has been used,
- * the amount of input must no longer be changed by
- * the application.
- *
- * When decoding, using LZMA_FINISH is optional unless the
- * LZMA_CONCATENATED flag was used when the decoder was
- * initialized. When LZMA_CONCATENATED was not used, the only
- * effect of LZMA_FINISH is that the amount of input must not
- * be changed just like in the encoder.
- */
+ LZMA_RUN = 0,
+ /**<
+ * \brief Continue coding
+ *
+ * Encoder: Encode as much input as possible. Some internal
+ * buffering will probably be done (depends on the filter
+ * chain in use), which causes latency: the input used won't
+ * usually be decodeable from the output of the same
+ * lzma_code() call.
+ *
+ * Decoder: Decode as much input as possible and produce as
+ * much output as possible.
+ */
+
+ LZMA_SYNC_FLUSH = 1,
+ /**<
+ * \brief Make all the input available at output
+ *
+ * Normally the encoder introduces some latency.
+ * LZMA_SYNC_FLUSH forces all the buffered data to be
+ * available at output without resetting the internal
+ * state of the encoder. This way it is possible to use
+ * compressed stream for example for communication over
+ * network.
+ *
+ * Only some filters support LZMA_SYNC_FLUSH. Trying to use
+ * LZMA_SYNC_FLUSH with filters that don't support it will
+ * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
+ * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
+ *
+ * Using LZMA_SYNC_FLUSH very often can dramatically reduce
+ * the compression ratio. With some filters (for example,
+ * LZMA2), fine-tuning the compression options may help
+ * mitigate this problem significantly (for example,
+ * match finder with LZMA2).
+ *
+ * Decoders don't support LZMA_SYNC_FLUSH.
+ */
+
+ LZMA_FULL_FLUSH = 2,
+ /**<
+ * \brief Finish encoding of the current Block
+ *
+ * All the input data going to the current Block must have
+ * been given to the encoder (the last bytes can still be
+ * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH
+ * until it returns LZMA_STREAM_END. Then continue normally
+ * with LZMA_RUN or finish the Stream with LZMA_FINISH.
+ *
+ * This action is currently supported only by Stream encoder
+ * and easy encoder (which uses Stream encoder). If there is
+ * no unfinished Block, no empty Block is created.
+ */
+
+ LZMA_FULL_BARRIER = 4,
+ /**<
+ * \brief Finish encoding of the current Block
+ *
+ * This is like LZMA_FULL_FLUSH except that this doesn't
+ * necessarily wait until all the input has been made
+ * available via the output buffer. That is, lzma_code()
+ * might return LZMA_STREAM_END as soon as all the input
+ * has been consumed (avail_in == 0).
+ *
+ * LZMA_FULL_BARRIER is useful with a threaded encoder if
+ * one wants to split the .xz Stream into Blocks at specific
+ * offsets but doesn't care if the output isn't flushed
+ * immediately. Using LZMA_FULL_BARRIER allows keeping
+ * the threads busy while LZMA_FULL_FLUSH would make
+ * lzma_code() wait until all the threads have finished
+ * until more data could be passed to the encoder.
+ *
+ * With a lzma_stream initialized with the single-threaded
+ * lzma_stream_encoder() or lzma_easy_encoder(),
+ * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.
+ */
+
+ LZMA_FINISH = 3
+ /**<
+ * \brief Finish the coding operation
+ *
+ * All the input data must have been given to the encoder
+ * (the last bytes can still be pending in next_in).
+ * Call lzma_code() with LZMA_FINISH until it returns
+ * LZMA_STREAM_END. Once LZMA_FINISH has been used,
+ * the amount of input must no longer be changed by
+ * the application.
+ *
+ * When decoding, using LZMA_FINISH is optional unless the
+ * LZMA_CONCATENATED flag was used when the decoder was
+ * initialized. When LZMA_CONCATENATED was not used, the only
+ * effect of LZMA_FINISH is that the amount of input must not
+ * be changed just like in the encoder.
+ */
} lzma_action;
-
/**
* \brief Custom functions for memory handling
*
@@ -370,70 +363,69 @@ typedef enum {
* thus they must be thread safe.
*/
typedef struct {
- /**
- * \brief Pointer to a custom memory allocation function
- *
- * If you don't want a custom allocator, but still want
- * custom free(), set this to NULL and liblzma will use
- * the standard malloc().
- *
- * \param opaque lzma_allocator.opaque (see below)
- * \param nmemb Number of elements like in calloc(). liblzma
- * will always set nmemb to 1, so it is safe to
- * ignore nmemb in a custom allocator if you like.
- * The nmemb argument exists only for
- * compatibility with zlib and libbzip2.
- * \param size Size of an element in bytes.
- * liblzma never sets this to zero.
- *
- * \return Pointer to the beginning of a memory block of
- * `size' bytes, or NULL if allocation fails
- * for some reason. When allocation fails, functions
- * of liblzma return LZMA_MEM_ERROR.
- *
- * The allocator should not waste time zeroing the allocated buffers.
- * This is not only about speed, but also memory usage, since the
- * operating system kernel doesn't necessarily allocate the requested
- * memory in physical memory until it is actually used. With small
- * input files, liblzma may actually need only a fraction of the
- * memory that it requested for allocation.
- *
- * \note LZMA_MEM_ERROR is also used when the size of the
- * allocation would be greater than SIZE_MAX. Thus,
- * don't assume that the custom allocator must have
- * returned NULL if some function from liblzma
- * returns LZMA_MEM_ERROR.
- */
- void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
-
- /**
- * \brief Pointer to a custom memory freeing function
- *
- * If you don't want a custom freeing function, but still
- * want a custom allocator, set this to NULL and liblzma
- * will use the standard free().
- *
- * \param opaque lzma_allocator.opaque (see below)
- * \param ptr Pointer returned by lzma_allocator.alloc(),
- * or when it is set to NULL, a pointer returned
- * by the standard malloc().
- */
- void (LZMA_API_CALL *free)(void *opaque, void *ptr);
-
- /**
- * \brief Pointer passed to .alloc() and .free()
- *
- * opaque is passed as the first argument to lzma_allocator.alloc()
- * and lzma_allocator.free(). This intended to ease implementing
- * custom memory allocation functions for use with liblzma.
- *
- * If you don't need this, you should set this to NULL.
- */
- void *opaque;
+ /**
+ * \brief Pointer to a custom memory allocation function
+ *
+ * If you don't want a custom allocator, but still want
+ * custom free(), set this to NULL and liblzma will use
+ * the standard malloc().
+ *
+ * \param opaque lzma_allocator.opaque (see below)
+ * \param nmemb Number of elements like in calloc(). liblzma
+ * will always set nmemb to 1, so it is safe to
+ * ignore nmemb in a custom allocator if you like.
+ * The nmemb argument exists only for
+ * compatibility with zlib and libbzip2.
+ * \param size Size of an element in bytes.
+ * liblzma never sets this to zero.
+ *
+ * \return Pointer to the beginning of a memory block of
+ * `size' bytes, or NULL if allocation fails
+ * for some reason. When allocation fails, functions
+ * of liblzma return LZMA_MEM_ERROR.
+ *
+ * The allocator should not waste time zeroing the allocated buffers.
+ * This is not only about speed, but also memory usage, since the
+ * operating system kernel doesn't necessarily allocate the requested
+ * memory in physical memory until it is actually used. With small
+ * input files, liblzma may actually need only a fraction of the
+ * memory that it requested for allocation.
+ *
+ * \note LZMA_MEM_ERROR is also used when the size of the
+ * allocation would be greater than SIZE_MAX. Thus,
+ * don't assume that the custom allocator must have
+ * returned NULL if some function from liblzma
+ * returns LZMA_MEM_ERROR.
+ */
+ void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
+
+ /**
+ * \brief Pointer to a custom memory freeing function
+ *
+ * If you don't want a custom freeing function, but still
+ * want a custom allocator, set this to NULL and liblzma
+ * will use the standard free().
+ *
+ * \param opaque lzma_allocator.opaque (see below)
+ * \param ptr Pointer returned by lzma_allocator.alloc(),
+ * or when it is set to NULL, a pointer returned
+ * by the standard malloc().
+ */
+ void(LZMA_API_CALL *free)(void *opaque, void *ptr);
+
+ /**
+ * \brief Pointer passed to .alloc() and .free()
+ *
+ * opaque is passed as the first argument to lzma_allocator.alloc()
+ * and lzma_allocator.free(). This intended to ease implementing
+ * custom memory allocation functions for use with liblzma.
+ *
+ * If you don't need this, you should set this to NULL.
+ */
+ void *opaque;
} lzma_allocator;
-
/**
* \brief Internal data structure
*
@@ -441,7 +433,6 @@ typedef struct {
*/
typedef struct lzma_internal_s lzma_internal;
-
/**
* \brief Passing data to and from liblzma
*
@@ -483,47 +474,46 @@ typedef struct lzma_internal_s lzma_internal;
* values from lzma_get_progress().
*/
typedef struct {
- const uint8_t *next_in; /**< Pointer to the next input byte. */
- size_t avail_in; /**< Number of available input bytes in next_in. */
- uint64_t total_in; /**< Total number of bytes read by liblzma. */
-
- uint8_t *next_out; /**< Pointer to the next output position. */
- size_t avail_out; /**< Amount of free space in next_out. */
- uint64_t total_out; /**< Total number of bytes written by liblzma. */
-
- /**
- * \brief Custom memory allocation functions
- *
- * In most cases this is NULL which makes liblzma use
- * the standard malloc() and free().
- *
- * \note In 5.0.x this is not a const pointer.
- */
- const lzma_allocator *allocator;
-
- /** Internal state is not visible to applications. */
- lzma_internal *internal;
-
- /*
- * Reserved space to allow possible future extensions without
- * breaking the ABI. Excluding the initialization of this structure,
- * you should not touch these, because the names of these variables
- * may change.
- */
- void *reserved_ptr1;
- void *reserved_ptr2;
- void *reserved_ptr3;
- void *reserved_ptr4;
- uint64_t reserved_int1;
- uint64_t reserved_int2;
- size_t reserved_int3;
- size_t reserved_int4;
- lzma_reserved_enum reserved_enum1;
- lzma_reserved_enum reserved_enum2;
+ const uint8_t *next_in; /**< Pointer to the next input byte. */
+ size_t avail_in; /**< Number of available input bytes in next_in. */
+ uint64_t total_in; /**< Total number of bytes read by liblzma. */
+
+ uint8_t *next_out; /**< Pointer to the next output position. */
+ size_t avail_out; /**< Amount of free space in next_out. */
+ uint64_t total_out; /**< Total number of bytes written by liblzma. */
+
+ /**
+ * \brief Custom memory allocation functions
+ *
+ * In most cases this is NULL which makes liblzma use
+ * the standard malloc() and free().
+ *
+ * \note In 5.0.x this is not a const pointer.
+ */
+ const lzma_allocator *allocator;
+
+ /** Internal state is not visible to applications. */
+ lzma_internal *internal;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. Excluding the initialization of this structure,
+ * you should not touch these, because the names of these variables
+ * may change.
+ */
+ void *reserved_ptr1;
+ void *reserved_ptr2;
+ void *reserved_ptr3;
+ void *reserved_ptr4;
+ uint64_t reserved_int1;
+ uint64_t reserved_int2;
+ size_t reserved_int3;
+ size_t reserved_int4;
+ lzma_reserved_enum reserved_enum1;
+ lzma_reserved_enum reserved_enum2;
} lzma_stream;
-
/**
* \brief Initialization for lzma_stream
*
@@ -542,11 +532,11 @@ typedef struct {
* lzma_stream tmp = LZMA_STREAM_INIT;
* *strm = tmp;
*/
-#define LZMA_STREAM_INIT \
- { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
- NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
- LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
-
+#define LZMA_STREAM_INIT \
+ { \
+ NULL, 0, 0, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
+ LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM \
+ }
/**
* \brief Encode or decode data
@@ -560,9 +550,9 @@ typedef struct {
* See the description of the coder-specific initialization function to find
* out what `action' values are supported by the coder.
*/
-extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_code(lzma_stream *strm,
+ lzma_action action) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Free memory allocated for the coder data structures
@@ -579,7 +569,6 @@ extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
*/
extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
-
/**
* \brief Get progress information
*
@@ -595,9 +584,9 @@ extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
* single-threaded mode *progress_in and *progress_out are set to
* strm->total_in and strm->total_out, respectively.
*/
-extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
- uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
-
+extern LZMA_API(void)
+ lzma_get_progress(lzma_stream *strm, uint64_t *progress_in,
+ uint64_t *progress_out) lzma_nothrow;
/**
* \brief Get the memory usage of decoder filter chain
@@ -621,9 +610,8 @@ extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
* If this function isn't supported by *strm or some other error
* occurs, zero is returned.
*/
-extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint64_t)
+ lzma_memusage(const lzma_stream *strm) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the current memory usage limit
@@ -634,9 +622,8 @@ extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
* \return On success, the current memory usage limit is returned
* (always non-zero). On error, zero is returned.
*/
-extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint64_t)
+ lzma_memlimit_get(const lzma_stream *strm) lzma_nothrow lzma_attr_pure;
/**
* \brief Set the memory usage limit
@@ -650,5 +637,5 @@ extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
* - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
* support memory usage limit or memlimit was zero.
*/
-extern LZMA_API(lzma_ret) lzma_memlimit_set(
- lzma_stream *strm, uint64_t memlimit) lzma_nothrow;
+extern LZMA_API(lzma_ret)
+ lzma_memlimit_set(lzma_stream *strm, uint64_t memlimit) lzma_nothrow;
diff --git a/node_modules/lzma-native/deps/include/lzma/bcj.h b/node_modules/lzma-native/deps/include/lzma/bcj.h
index afb0098..6c68eb8 100644
--- a/node_modules/lzma-native/deps/include/lzma/bcj.h
+++ b/node_modules/lzma-native/deps/include/lzma/bcj.h
@@ -13,42 +13,40 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use 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_X86 LZMA_VLI_C(0x04)
+/**<
+ * Filter for x86 binaries
+ */
-#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
- /**<
- * Filter for IA-64 (Itanium) binaries.
- */
+#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
+/**<
+ * Filter for Big endian PowerPC binaries
+ */
-#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
- /**<
- * Filter for ARM binaries.
- */
+#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
+/**<
+ * Filter for IA-64 (Itanium) binaries.
+ */
-#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
- /**<
- * Filter for ARM-Thumb binaries.
- */
+#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
+/**<
+ * Filter for ARM binaries.
+ */
-#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
- /**<
- * Filter for SPARC 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.
+ */
/**
* \brief Options for BCJ filters
@@ -71,20 +69,20 @@
* 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;
+ /**
+ * \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;
diff --git a/node_modules/lzma-native/deps/include/lzma/block.h b/node_modules/lzma-native/deps/include/lzma/block.h
index 5f39b3e..5841956 100644
--- a/node_modules/lzma-native/deps/include/lzma/block.h
+++ b/node_modules/lzma-native/deps/include/lzma/block.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Options for the Block and Block Header encoders and decoders
*
@@ -28,249 +27,248 @@
* later calls to lzma_code().
*/
typedef struct {
- /**
- * \brief Block format version
- *
- * To prevent API and ABI breakages when new features are needed,
- * a version number is used to indicate which fields in this
- * structure are in use:
- * - liblzma >= 5.0.0: version = 0 is supported.
- * - liblzma >= 5.1.4beta: Support for version = 1 was added,
- * which adds the ignore_check field.
- *
- * If version is greater than one, most Block related functions
- * will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works
- * with any version value).
- *
- * Read by:
- * - All functions that take pointer to lzma_block as argument,
- * including lzma_block_header_decode().
- *
- * Written by:
- * - lzma_block_header_decode()
- */
- uint32_t version;
-
- /**
- * \brief Size of the Block Header field
- *
- * This is always a multiple of four.
- *
- * Read by:
- * - lzma_block_header_encode()
- * - lzma_block_header_decode()
- * - lzma_block_compressed_size()
- * - lzma_block_unpadded_size()
- * - lzma_block_total_size()
- * - lzma_block_decoder()
- * - lzma_block_buffer_decode()
- *
- * Written by:
- * - lzma_block_header_size()
- * - lzma_block_buffer_encode()
- */
- uint32_t header_size;
-# define LZMA_BLOCK_HEADER_SIZE_MIN 8
-# define LZMA_BLOCK_HEADER_SIZE_MAX 1024
-
- /**
- * \brief Type of integrity Check
- *
- * The Check ID is not stored into the Block Header, thus its value
- * must be provided also when decoding.
- *
- * Read by:
- * - lzma_block_header_encode()
- * - lzma_block_header_decode()
- * - lzma_block_compressed_size()
- * - lzma_block_unpadded_size()
- * - lzma_block_total_size()
- * - lzma_block_encoder()
- * - lzma_block_decoder()
- * - lzma_block_buffer_encode()
- * - lzma_block_buffer_decode()
- */
- lzma_check check;
-
- /**
- * \brief Size of the Compressed Data in bytes
- *
- * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
- * will store this value to the Block Header. Block encoder doesn't
- * care about this value, but will set it once the encoding has been
- * finished.
- *
- * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
- * verify that the size of the Compressed Data field matches
- * compressed_size.
- *
- * Usually you don't know this value when encoding in streamed mode,
- * and thus cannot write this field into the Block Header.
- *
- * In non-streamed mode you can reserve space for this field before
- * encoding the actual Block. After encoding the data, finish the
- * Block by encoding the Block Header. Steps in detail:
- *
- * - Set compressed_size to some big enough value. If you don't know
- * better, use LZMA_VLI_MAX, but remember that bigger values take
- * more space in Block Header.
- *
- * - Call lzma_block_header_size() to see how much space you need to
- * reserve for the Block Header.
- *
- * - Encode the Block using lzma_block_encoder() and lzma_code().
- * It sets compressed_size to the correct value.
- *
- * - Use lzma_block_header_encode() to encode the Block Header.
- * Because space was reserved in the first step, you don't need
- * to call lzma_block_header_size() anymore, because due to
- * reserving, header_size has to be big enough. If it is "too big",
- * lzma_block_header_encode() will add enough Header Padding to
- * make Block Header to match the size specified by header_size.
- *
- * Read by:
- * - lzma_block_header_size()
- * - lzma_block_header_encode()
- * - lzma_block_compressed_size()
- * - lzma_block_unpadded_size()
- * - lzma_block_total_size()
- * - lzma_block_decoder()
- * - lzma_block_buffer_decode()
- *
- * Written by:
- * - lzma_block_header_decode()
- * - lzma_block_compressed_size()
- * - lzma_block_encoder()
- * - lzma_block_decoder()
- * - lzma_block_buffer_encode()
- * - lzma_block_buffer_decode()
- */
- lzma_vli compressed_size;
-
- /**
- * \brief Uncompressed Size in bytes
- *
- * This is handled very similarly to compressed_size above.
- *
- * uncompressed_size is needed by fewer functions than
- * compressed_size. This is because uncompressed_size isn't
- * needed to validate that Block stays within proper limits.
- *
- * Read by:
- * - lzma_block_header_size()
- * - lzma_block_header_encode()
- * - lzma_block_decoder()
- * - lzma_block_buffer_decode()
- *
- * Written by:
- * - lzma_block_header_decode()
- * - lzma_block_encoder()
- * - lzma_block_decoder()
- * - lzma_block_buffer_encode()
- * - lzma_block_buffer_decode()
- */
- lzma_vli uncompressed_size;
-
- /**
- * \brief Array of filters
- *
- * There can be 1-4 filters. The end of the array is marked with
- * .id = LZMA_VLI_UNKNOWN.
- *
- * Read by:
- * - lzma_block_header_size()
- * - lzma_block_header_encode()
- * - lzma_block_encoder()
- * - lzma_block_decoder()
- * - lzma_block_buffer_encode()
- * - lzma_block_buffer_decode()
- *
- * Written by:
- * - lzma_block_header_decode(): Note that this does NOT free()
- * the old filter options structures. All unused filters[] will
- * have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
- * decoding fails, all filters[] are guaranteed to be
- * LZMA_VLI_UNKNOWN and NULL.
- *
- * \note Because of the array is terminated with
- * .id = LZMA_VLI_UNKNOWN, the actual array must
- * have LZMA_FILTERS_MAX + 1 members or the Block
- * Header decoder will overflow the buffer.
- */
- lzma_filter *filters;
-
- /**
- * \brief Raw value stored in the Check field
- *
- * After successful coding, the first lzma_check_size(check) bytes
- * of this array contain the raw value stored in the Check field.
- *
- * Note that CRC32 and CRC64 are stored in little endian byte order.
- * Take it into account if you display the Check values to the user.
- *
- * Written by:
- * - lzma_block_encoder()
- * - lzma_block_decoder()
- * - lzma_block_buffer_encode()
- * - lzma_block_buffer_decode()
- */
- uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
-
- /*
- * Reserved space to allow possible future extensions without
- * breaking the ABI. You should not touch these, because the names
- * of these variables may change. These are and will never be used
- * with the currently supported options, so it is safe to leave these
- * uninitialized.
- */
- void *reserved_ptr1;
- void *reserved_ptr2;
- void *reserved_ptr3;
- uint32_t reserved_int1;
- uint32_t reserved_int2;
- lzma_vli reserved_int3;
- lzma_vli reserved_int4;
- lzma_vli reserved_int5;
- lzma_vli reserved_int6;
- lzma_vli reserved_int7;
- lzma_vli reserved_int8;
- lzma_reserved_enum reserved_enum1;
- lzma_reserved_enum reserved_enum2;
- lzma_reserved_enum reserved_enum3;
- lzma_reserved_enum reserved_enum4;
-
- /**
- * \brief A flag to Block decoder to not verify the Check field
- *
- * This field is supported by liblzma >= 5.1.4beta if .version >= 1.
- *
- * If this is set to true, the integrity check won't be calculated
- * and verified. Unless you know what you are doing, you should
- * leave this to false. (A reason to set this to true is when the
- * file integrity is verified externally anyway and you want to
- * speed up the decompression, which matters mostly when using
- * SHA-256 as the integrity check.)
- *
- * If .version >= 1, read by:
- * - lzma_block_decoder()
- * - lzma_block_buffer_decode()
- *
- * Written by (.version is ignored):
- * - lzma_block_header_decode() always sets this to false
- */
- lzma_bool ignore_check;
-
- lzma_bool reserved_bool2;
- lzma_bool reserved_bool3;
- lzma_bool reserved_bool4;
- lzma_bool reserved_bool5;
- lzma_bool reserved_bool6;
- lzma_bool reserved_bool7;
- lzma_bool reserved_bool8;
+ /**
+ * \brief Block format version
+ *
+ * To prevent API and ABI breakages when new features are needed,
+ * a version number is used to indicate which fields in this
+ * structure are in use:
+ * - liblzma >= 5.0.0: version = 0 is supported.
+ * - liblzma >= 5.1.4beta: Support for version = 1 was added,
+ * which adds the ignore_check field.
+ *
+ * If version is greater than one, most Block related functions
+ * will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works
+ * with any version value).
+ *
+ * Read by:
+ * - All functions that take pointer to lzma_block as argument,
+ * including lzma_block_header_decode().
+ *
+ * Written by:
+ * - lzma_block_header_decode()
+ */
+ uint32_t version;
+
+ /**
+ * \brief Size of the Block Header field
+ *
+ * This is always a multiple of four.
+ *
+ * Read by:
+ * - lzma_block_header_encode()
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_size()
+ * - lzma_block_buffer_encode()
+ */
+ uint32_t header_size;
+#define LZMA_BLOCK_HEADER_SIZE_MIN 8
+#define LZMA_BLOCK_HEADER_SIZE_MAX 1024
+
+ /**
+ * \brief Type of integrity Check
+ *
+ * The Check ID is not stored into the Block Header, thus its value
+ * must be provided also when decoding.
+ *
+ * Read by:
+ * - lzma_block_header_encode()
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ */
+ lzma_check check;
+
+ /**
+ * \brief Size of the Compressed Data in bytes
+ *
+ * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
+ * will store this value to the Block Header. Block encoder doesn't
+ * care about this value, but will set it once the encoding has been
+ * finished.
+ *
+ * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
+ * verify that the size of the Compressed Data field matches
+ * compressed_size.
+ *
+ * Usually you don't know this value when encoding in streamed mode,
+ * and thus cannot write this field into the Block Header.
+ *
+ * In non-streamed mode you can reserve space for this field before
+ * encoding the actual Block. After encoding the data, finish the
+ * Block by encoding the Block Header. Steps in detail:
+ *
+ * - Set compressed_size to some big enough value. If you don't know
+ * better, use LZMA_VLI_MAX, but remember that bigger values take
+ * more space in Block Header.
+ *
+ * - Call lzma_block_header_size() to see how much space you need to
+ * reserve for the Block Header.
+ *
+ * - Encode the Block using lzma_block_encoder() and lzma_code().
+ * It sets compressed_size to the correct value.
+ *
+ * - Use lzma_block_header_encode() to encode the Block Header.
+ * Because space was reserved in the first step, you don't need
+ * to call lzma_block_header_size() anymore, because due to
+ * reserving, header_size has to be big enough. If it is "too big",
+ * lzma_block_header_encode() will add enough Header Padding to
+ * make Block Header to match the size specified by header_size.
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ */
+ lzma_vli compressed_size;
+
+ /**
+ * \brief Uncompressed Size in bytes
+ *
+ * This is handled very similarly to compressed_size above.
+ *
+ * uncompressed_size is needed by fewer functions than
+ * compressed_size. This is because uncompressed_size isn't
+ * needed to validate that Block stays within proper limits.
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Array of filters
+ *
+ * There can be 1-4 filters. The end of the array is marked with
+ * .id = LZMA_VLI_UNKNOWN.
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode(): Note that this does NOT free()
+ * the old filter options structures. All unused filters[] will
+ * have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
+ * decoding fails, all filters[] are guaranteed to be
+ * LZMA_VLI_UNKNOWN and NULL.
+ *
+ * \note Because of the array is terminated with
+ * .id = LZMA_VLI_UNKNOWN, the actual array must
+ * have LZMA_FILTERS_MAX + 1 members or the Block
+ * Header decoder will overflow the buffer.
+ */
+ lzma_filter *filters;
+
+ /**
+ * \brief Raw value stored in the Check field
+ *
+ * After successful coding, the first lzma_check_size(check) bytes
+ * of this array contain the raw value stored in the Check field.
+ *
+ * Note that CRC32 and CRC64 are stored in little endian byte order.
+ * Take it into account if you display the Check values to the user.
+ *
+ * Written by:
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ */
+ uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * with the currently supported options, so it is safe to leave these
+ * uninitialized.
+ */
+ void *reserved_ptr1;
+ void *reserved_ptr2;
+ void *reserved_ptr3;
+ uint32_t reserved_int1;
+ uint32_t reserved_int2;
+ lzma_vli reserved_int3;
+ lzma_vli reserved_int4;
+ lzma_vli reserved_int5;
+ lzma_vli reserved_int6;
+ lzma_vli reserved_int7;
+ lzma_vli reserved_int8;
+ lzma_reserved_enum reserved_enum1;
+ lzma_reserved_enum reserved_enum2;
+ lzma_reserved_enum reserved_enum3;
+ lzma_reserved_enum reserved_enum4;
+
+ /**
+ * \brief A flag to Block decoder to not verify the Check field
+ *
+ * This field is supported by liblzma >= 5.1.4beta if .version >= 1.
+ *
+ * If this is set to true, the integrity check won't be calculated
+ * and verified. Unless you know what you are doing, you should
+ * leave this to false. (A reason to set this to true is when the
+ * file integrity is verified externally anyway and you want to
+ * speed up the decompression, which matters mostly when using
+ * SHA-256 as the integrity check.)
+ *
+ * If .version >= 1, read by:
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by (.version is ignored):
+ * - lzma_block_header_decode() always sets this to false
+ */
+ lzma_bool ignore_check;
+
+ lzma_bool reserved_bool2;
+ lzma_bool reserved_bool3;
+ lzma_bool reserved_bool4;
+ lzma_bool reserved_bool5;
+ lzma_bool reserved_bool6;
+ lzma_bool reserved_bool7;
+ lzma_bool reserved_bool8;
} lzma_block;
-
/**
* \brief Decode the Block Header Size field
*
@@ -284,7 +282,6 @@ typedef struct {
*/
#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
-
/**
* \brief Calculate Block Header Size
*
@@ -307,8 +304,7 @@ typedef struct {
* a side-effect validates the filter chain.
*/
extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Encode Block Header
@@ -328,10 +324,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
* - LZMA_PROG_ERROR: Invalid arguments, for example
* block->header_size is invalid or block->filters is NULL.
*/
-extern LZMA_API(lzma_ret) lzma_block_header_encode(
- const lzma_block *block, uint8_t *out)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_block_header_encode(const lzma_block *block, uint8_t *out)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Decode Block Header
@@ -373,10 +368,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
* - LZMA_PROG_ERROR: Invalid arguments, for example
* block->header_size is invalid or block->filters is NULL.
*/
-extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
- const lzma_allocator *allocator, const uint8_t *in)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret) lzma_block_header_decode(
+ lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Validate and set Compressed Size according to Unpadded Size
@@ -405,10 +399,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
* block->header_size must be a multiple of four and
* between 8 and 1024 inclusive.
*/
-extern LZMA_API(lzma_ret) lzma_block_compressed_size(
- lzma_block *block, lzma_vli unpadded_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Calculate Unpadded Size
@@ -422,8 +415,7 @@ extern LZMA_API(lzma_ret) lzma_block_compressed_size(
* \return Unpadded Size on success, or zero on error.
*/
extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
- lzma_nothrow lzma_attr_pure;
-
+ lzma_nothrow lzma_attr_pure;
/**
* \brief Calculate the total encoded size of a Block
@@ -434,9 +426,8 @@ extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
* \return On success, total encoded size of the Block. On error,
* zero is returned.
*/
-extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_block_total_size(const lzma_block *block) lzma_nothrow lzma_attr_pure;
/**
* \brief Initialize .xz Block encoder
@@ -452,10 +443,9 @@ extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
* the encoder failed.
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_block_encoder(
- lzma_stream *strm, lzma_block *block)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_block_encoder(lzma_stream *strm, lzma_block *block)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Initialize .xz Block decoder
@@ -470,10 +460,9 @@ extern LZMA_API(lzma_ret) lzma_block_encoder(
* - LZMA_PROG_ERROR
* - LZMA_MEM_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_block_decoder(
- lzma_stream *strm, lzma_block *block)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_block_decoder(lzma_stream *strm, lzma_block *block)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Calculate maximum output size for single-call Block encoding
@@ -481,9 +470,8 @@ extern LZMA_API(lzma_ret) lzma_block_decoder(
* This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
* See the documentation of lzma_stream_buffer_bound().
*/
-extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
- lzma_nothrow;
-
+extern LZMA_API(size_t)
+ lzma_block_buffer_bound(size_t uncompressed_size) lzma_nothrow;
/**
* \brief Single-call .xz Block encoder
@@ -523,11 +511,9 @@ extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
* - LZMA_PROG_ERROR
*/
extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
- lzma_block *block, const lzma_allocator *allocator,
- const uint8_t *in, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+ lzma_block *block, const lzma_allocator *allocator, const uint8_t *in,
+ size_t in_size, uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Single-call uncompressed .xz Block encoder
@@ -541,11 +527,9 @@ extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
* This function doesn't take lzma_allocator because this function doesn't
* allocate any memory from the heap.
*/
-extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
- const uint8_t *in, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(
+ lzma_block *block, const uint8_t *in, size_t in_size, uint8_t *out,
+ size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Single-call .xz Block decoder
@@ -574,8 +558,8 @@ extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
* - LZMA_BUF_ERROR: Output buffer was too small.
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
- lzma_block *block, const lzma_allocator *allocator,
- const uint8_t *in, size_t *in_pos, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size)
- lzma_nothrow;
+extern LZMA_API(lzma_ret)
+ lzma_block_buffer_decode(lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow;
diff --git a/node_modules/lzma-native/deps/include/lzma/check.h b/node_modules/lzma-native/deps/include/lzma/check.h
index 1fdd56d..59317a1 100644
--- a/node_modules/lzma-native/deps/include/lzma/check.h
+++ b/node_modules/lzma-native/deps/include/lzma/check.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Type of the integrity check (Check ID)
*
@@ -25,36 +24,35 @@
* detect errors.
*/
typedef enum {
- LZMA_CHECK_NONE = 0,
- /**<
- * No Check is calculated.
- *
- * Size of the Check field: 0 bytes
- */
-
- LZMA_CHECK_CRC32 = 1,
- /**<
- * CRC32 using the polynomial from the IEEE 802.3 standard
- *
- * Size of the Check field: 4 bytes
- */
-
- LZMA_CHECK_CRC64 = 4,
- /**<
- * CRC64 using the polynomial from the ECMA-182 standard
- *
- * Size of the Check field: 8 bytes
- */
-
- LZMA_CHECK_SHA256 = 10
- /**<
- * SHA-256
- *
- * Size of the Check field: 32 bytes
- */
+ LZMA_CHECK_NONE = 0,
+ /**<
+ * No Check is calculated.
+ *
+ * Size of the Check field: 0 bytes
+ */
+
+ LZMA_CHECK_CRC32 = 1,
+ /**<
+ * CRC32 using the polynomial from the IEEE 802.3 standard
+ *
+ * Size of the Check field: 4 bytes
+ */
+
+ LZMA_CHECK_CRC64 = 4,
+ /**<
+ * CRC64 using the polynomial from the ECMA-182 standard
+ *
+ * Size of the Check field: 8 bytes
+ */
+
+ LZMA_CHECK_SHA256 = 10
+ /**<
+ * SHA-256
+ *
+ * Size of the Check field: 32 bytes
+ */
} lzma_check;
-
/**
* \brief Maximum valid Check ID
*
@@ -67,7 +65,6 @@ typedef enum {
*/
#define LZMA_CHECK_ID_MAX 15
-
/**
* \brief Test if the given Check ID is supported
*
@@ -78,9 +75,8 @@ typedef enum {
* You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always
* supported (even if liblzma is built with limited features).
*/
-extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
- lzma_nothrow lzma_attr_const;
-
+extern LZMA_API(lzma_bool)
+ lzma_check_is_supported(lzma_check check) lzma_nothrow lzma_attr_const;
/**
* \brief Get the size of the Check field with the given Check ID
@@ -92,16 +88,14 @@ extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
*
* If the argument is not in the range [0, 15], UINT32_MAX is returned.
*/
-extern LZMA_API(uint32_t) lzma_check_size(lzma_check check)
- lzma_nothrow lzma_attr_const;
-
+extern LZMA_API(uint32_t)
+ lzma_check_size(lzma_check check) lzma_nothrow lzma_attr_const;
/**
* \brief Maximum size of a Check field
*/
#define LZMA_CHECK_SIZE_MAX 64
-
/**
* \brief Calculate CRC32
*
@@ -116,10 +110,8 @@ extern LZMA_API(uint32_t) lzma_check_size(lzma_check check)
* \return Updated CRC value, which can be passed to this function
* again to continue CRC calculation.
*/
-extern LZMA_API(uint32_t) lzma_crc32(
- const uint8_t *buf, size_t size, uint32_t crc)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint32_t) lzma_crc32(const uint8_t *buf, size_t size,
+ uint32_t crc) lzma_nothrow lzma_attr_pure;
/**
* \brief Calculate CRC64
@@ -128,17 +120,14 @@ extern LZMA_API(uint32_t) lzma_crc32(
*
* This function is used similarly to lzma_crc32(). See its documentation.
*/
-extern LZMA_API(uint64_t) lzma_crc64(
- const uint8_t *buf, size_t size, uint64_t crc)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint64_t) lzma_crc64(const uint8_t *buf, size_t size,
+ uint64_t crc) lzma_nothrow lzma_attr_pure;
/*
* SHA-256 functions are currently not exported to public API.
* Contact Lasse Collin if you think it should be.
*/
-
/**
* \brief Get the type of the integrity check
*
@@ -146,5 +135,5 @@ extern LZMA_API(uint64_t) lzma_crc64(
* returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK.
* Calling this function in any other situation has undefined behavior.
*/
-extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm)
- lzma_nothrow;
+extern LZMA_API(lzma_check)
+ lzma_get_check(const lzma_stream *strm) lzma_nothrow;
diff --git a/node_modules/lzma-native/deps/include/lzma/container.h b/node_modules/lzma-native/deps/include/lzma/container.h
index a4ab998..b469585 100644
--- a/node_modules/lzma-native/deps/include/lzma/container.h
+++ b/node_modules/lzma-native/deps/include/lzma/container.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/************
* Encoding *
************/
@@ -28,8 +27,7 @@
* cases keeping the resource usage relatively low is more important that
* getting the maximum compression ratio.
*/
-#define LZMA_PRESET_DEFAULT UINT32_C(6)
-
+#define LZMA_PRESET_DEFAULT UINT32_C(6)
/**
* \brief Mask for preset level
@@ -37,8 +35,7 @@
* This is useful only if you need to extract the level from the preset
* variable. That should be rare.
*/
-#define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F)
-
+#define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F)
/*
* Preset flags
@@ -57,134 +54,132 @@
* least not significantly). The memory usage of the encoder may be increased
* a little but only at the lowest preset levels (0-3).
*/
-#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
-
+#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
/**
* \brief Multithreading options
*/
typedef struct {
- /**
- * \brief Flags
- *
- * Set this to zero if no flags are wanted.
- *
- * No flags are currently supported.
- */
- uint32_t flags;
-
- /**
- * \brief Number of worker threads to use
- */
- uint32_t threads;
-
- /**
- * \brief Maximum uncompressed size of a Block
- *
- * The encoder will start a new .xz Block every block_size bytes.
- * Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code()
- * the caller may tell liblzma to start a new Block earlier.
- *
- * With LZMA2, a recommended block size is 2-4 times the LZMA2
- * dictionary size. With very small dictionaries, it is recommended
- * to use at least 1 MiB block size for good compression ratio, even
- * if this is more than four times the dictionary size. Note that
- * these are only recommendations for typical use cases; feel free
- * to use other values. Just keep in mind that using a block size
- * less than the LZMA2 dictionary size is waste of RAM.
- *
- * Set this to 0 to let liblzma choose the block size depending
- * on the compression options. For LZMA2 it will be 3*dict_size
- * or 1 MiB, whichever is more.
- *
- * For each thread, about 3 * block_size bytes of memory will be
- * allocated. This may change in later liblzma versions. If so,
- * the memory usage will probably be reduced, not increased.
- */
- uint64_t block_size;
-
- /**
- * \brief Timeout to allow lzma_code() to return early
- *
- * Multithreading can make liblzma to consume input and produce
- * output in a very bursty way: it may first read a lot of input
- * to fill internal buffers, then no input or output occurs for
- * a while.
- *
- * In single-threaded mode, lzma_code() won't return until it has
- * either consumed all the input or filled the output buffer. If
- * this is done in multithreaded mode, it may cause a call
- * lzma_code() to take even tens of seconds, which isn't acceptable
- * in all applications.
- *
- * To avoid very long blocking times in lzma_code(), a timeout
- * (in milliseconds) may be set here. If lzma_code() would block
- * longer than this number of milliseconds, it will return with
- * LZMA_OK. Reasonable values are 100 ms or more. The xz command
- * line tool uses 300 ms.
- *
- * If long blocking times are fine for you, set timeout to a special
- * value of 0, which will disable the timeout mechanism and will make
- * lzma_code() block until all the input is consumed or the output
- * buffer has been filled.
- *
- * \note Even with a timeout, lzma_code() might sometimes take
- * somewhat long time to return. No timing guarantees
- * are made.
- */
- uint32_t timeout;
-
- /**
- * \brief Compression preset (level and possible flags)
- *
- * The preset is set just like with lzma_easy_encoder().
- * The preset is ignored if filters below is non-NULL.
- */
- uint32_t preset;
-
- /**
- * \brief Filter chain (alternative to a preset)
- *
- * If this is NULL, the preset above is used. Otherwise the preset
- * is ignored and the filter chain specified here is used.
- */
- const lzma_filter *filters;
-
- /**
- * \brief Integrity check type
- *
- * See check.h for available checks. The xz command line tool
- * defaults to LZMA_CHECK_CRC64, which is a good choice if you
- * are unsure.
- */
- lzma_check check;
-
- /*
- * Reserved space to allow possible future extensions without
- * breaking the ABI. You should not touch these, because the names
- * of these variables may change. These are and will never be used
- * with the currently supported options, so it is safe to leave these
- * uninitialized.
- */
- lzma_reserved_enum reserved_enum1;
- lzma_reserved_enum reserved_enum2;
- lzma_reserved_enum reserved_enum3;
- uint32_t reserved_int1;
- uint32_t reserved_int2;
- uint32_t reserved_int3;
- uint32_t reserved_int4;
- uint64_t reserved_int5;
- uint64_t reserved_int6;
- uint64_t reserved_int7;
- uint64_t reserved_int8;
- void *reserved_ptr1;
- void *reserved_ptr2;
- void *reserved_ptr3;
- void *reserved_ptr4;
+ /**
+ * \brief Flags
+ *
+ * Set this to zero if no flags are wanted.
+ *
+ * No flags are currently supported.
+ */
+ uint32_t flags;
+
+ /**
+ * \brief Number of worker threads to use
+ */
+ uint32_t threads;
+
+ /**
+ * \brief Maximum uncompressed size of a Block
+ *
+ * The encoder will start a new .xz Block every block_size bytes.
+ * Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code()
+ * the caller may tell liblzma to start a new Block earlier.
+ *
+ * With LZMA2, a recommended block size is 2-4 times the LZMA2
+ * dictionary size. With very small dictionaries, it is recommended
+ * to use at least 1 MiB block size for good compression ratio, even
+ * if this is more than four times the dictionary size. Note that
+ * these are only recommendations for typical use cases; feel free
+ * to use other values. Just keep in mind that using a block size
+ * less than the LZMA2 dictionary size is waste of RAM.
+ *
+ * Set this to 0 to let liblzma choose the block size depending
+ * on the compression options. For LZMA2 it will be 3*dict_size
+ * or 1 MiB, whichever is more.
+ *
+ * For each thread, about 3 * block_size bytes of memory will be
+ * allocated. This may change in later liblzma versions. If so,
+ * the memory usage will probably be reduced, not increased.
+ */
+ uint64_t block_size;
+
+ /**
+ * \brief Timeout to allow lzma_code() to return early
+ *
+ * Multithreading can make liblzma to consume input and produce
+ * output in a very bursty way: it may first read a lot of input
+ * to fill internal buffers, then no input or output occurs for
+ * a while.
+ *
+ * In single-threaded mode, lzma_code() won't return until it has
+ * either consumed all the input or filled the output buffer. If
+ * this is done in multithreaded mode, it may cause a call
+ * lzma_code() to take even tens of seconds, which isn't acceptable
+ * in all applications.
+ *
+ * To avoid very long blocking times in lzma_code(), a timeout
+ * (in milliseconds) may be set here. If lzma_code() would block
+ * longer than this number of milliseconds, it will return with
+ * LZMA_OK. Reasonable values are 100 ms or more. The xz command
+ * line tool uses 300 ms.
+ *
+ * If long blocking times are fine for you, set timeout to a special
+ * value of 0, which will disable the timeout mechanism and will make
+ * lzma_code() block until all the input is consumed or the output
+ * buffer has been filled.
+ *
+ * \note Even with a timeout, lzma_code() might sometimes take
+ * somewhat long time to return. No timing guarantees
+ * are made.
+ */
+ uint32_t timeout;
+
+ /**
+ * \brief Compression preset (level and possible flags)
+ *
+ * The preset is set just like with lzma_easy_encoder().
+ * The preset is ignored if filters below is non-NULL.
+ */
+ uint32_t preset;
+
+ /**
+ * \brief Filter chain (alternative to a preset)
+ *
+ * If this is NULL, the preset above is used. Otherwise the preset
+ * is ignored and the filter chain specified here is used.
+ */
+ const lzma_filter *filters;
+
+ /**
+ * \brief Integrity check type
+ *
+ * See check.h for available checks. The xz command line tool
+ * defaults to LZMA_CHECK_CRC64, which is a good choice if you
+ * are unsure.
+ */
+ lzma_check check;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * with the currently supported options, so it is safe to leave these
+ * uninitialized.
+ */
+ lzma_reserved_enum reserved_enum1;
+ lzma_reserved_enum reserved_enum2;
+ lzma_reserved_enum reserved_enum3;
+ uint32_t reserved_int1;
+ uint32_t reserved_int2;
+ uint32_t reserved_int3;
+ uint32_t reserved_int4;
+ uint64_t reserved_int5;
+ uint64_t reserved_int6;
+ uint64_t reserved_int7;
+ uint64_t reserved_int8;
+ void *reserved_ptr1;
+ void *reserved_ptr2;
+ void *reserved_ptr3;
+ void *reserved_ptr4;
} lzma_mt;
-
/**
* \brief Calculate approximate memory usage of easy encoder
*
@@ -196,9 +191,8 @@ typedef struct {
* preset when encoding. If an error occurs, for example
* due to unsupported preset, UINT64_MAX is returned.
*/
-extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint64_t)
+ lzma_easy_encoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure;
/**
* \brief Calculate approximate decoder memory usage of a preset
@@ -212,9 +206,8 @@ extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
* occurs, for example due to unsupported preset, UINT64_MAX
* is returned.
*/
-extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint64_t)
+ lzma_easy_decoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure;
/**
* \brief Initialize .xz Stream encoder using a preset number
@@ -255,10 +248,9 @@ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
* LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
* there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
*/
-extern LZMA_API(lzma_ret) lzma_easy_encoder(
- lzma_stream *strm, uint32_t preset, lzma_check check)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Single-call .xz Stream encoding using a preset number
@@ -288,12 +280,11 @@ extern LZMA_API(lzma_ret) lzma_easy_encoder(
* - LZMA_DATA_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
- uint32_t preset, lzma_check check,
- const lzma_allocator *allocator,
- const uint8_t *in, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_easy_buffer_encode(uint32_t preset, lzma_check check,
+ const lzma_allocator *allocator, const uint8_t *in,
+ size_t in_size, uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow;
/**
* \brief Initialize .xz Stream encoder using a custom filter chain
@@ -311,10 +302,9 @@ extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
* - LZMA_OPTIONS_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
- const lzma_filter *filters, lzma_check check)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret) lzma_stream_encoder(
+ lzma_stream *strm, const lzma_filter *filters,
+ lzma_check check) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Calculate approximate memory usage of multithreaded .xz encoder
@@ -332,8 +322,7 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
* unsupported preset or filter chain, UINT64_MAX is returned.
*/
extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
- const lzma_mt *options) lzma_nothrow lzma_attr_pure;
-
+ const lzma_mt *options) lzma_nothrow lzma_attr_pure;
/**
* \brief Initialize multithreaded .xz Stream encoder
@@ -354,10 +343,9 @@ extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
* - LZMA_OPTIONS_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
- lzma_stream *strm, const lzma_mt *options)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_stream_encoder_mt(lzma_stream *strm, const lzma_mt *options)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Initialize .lzma encoder (legacy file format)
@@ -379,10 +367,9 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
* - LZMA_OPTIONS_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_alone_encoder(
- lzma_stream *strm, const lzma_options_lzma *options)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Calculate output buffer size for single-call Stream encoder
@@ -406,9 +393,8 @@ extern LZMA_API(lzma_ret) lzma_alone_encoder(
* uncompressible data. Currently there is no function to
* calculate the maximum expansion of multi-call encoding.
*/
-extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
- lzma_nothrow;
-
+extern LZMA_API(size_t)
+ lzma_stream_buffer_bound(size_t uncompressed_size) lzma_nothrow;
/**
* \brief Single-call .xz Stream encoder
@@ -437,12 +423,9 @@ extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
* - LZMA_PROG_ERROR
*/
extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
- lzma_filter *filters, lzma_check check,
- const lzma_allocator *allocator,
- const uint8_t *in, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+ lzma_filter *filters, lzma_check check, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow lzma_attr_warn_unused_result;
/************
* Decoding *
@@ -454,8 +437,7 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK
* if LZMA_TELL_NO_CHECK is used.
*/
-#define LZMA_TELL_NO_CHECK UINT32_C(0x01)
-
+#define LZMA_TELL_NO_CHECK UINT32_C(0x01)
/**
* This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input
@@ -463,16 +445,14 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* supported by this liblzma version or build. Such files can still be
* decoded, but the integrity check cannot be verified.
*/
-#define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02)
-
+#define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02)
/**
* This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type
* of the integrity check is known. The type can then be got with
* lzma_get_check().
*/
-#define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
-
+#define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
/**
* This flag makes lzma_code() not calculate and verify the integrity check
@@ -495,8 +475,7 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
*
* Support for this flag was added in liblzma 5.1.4beta.
*/
-#define LZMA_IGNORE_CHECK UINT32_C(0x10)
-
+#define LZMA_IGNORE_CHECK UINT32_C(0x10)
/**
* This flag enables decoding of concatenated files with file formats that
@@ -512,8 +491,7 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH
* as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
*/
-#define LZMA_CONCATENATED UINT32_C(0x08)
-
+#define LZMA_CONCATENATED UINT32_C(0x08)
/**
* \brief Initialize .xz Stream decoder
@@ -530,10 +508,9 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* - LZMA_OPTIONS_ERROR: Unsupported flags
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_stream_decoder(
- lzma_stream *strm, uint64_t memlimit, uint32_t flags)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Decode .xz Streams and .lzma files with autodetection
@@ -552,10 +529,9 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder(
* - LZMA_OPTIONS_ERROR: Unsupported flags
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_auto_decoder(
- lzma_stream *strm, uint64_t memlimit, uint32_t flags)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit,
+ uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Initialize .lzma decoder (legacy file format)
@@ -568,10 +544,9 @@ extern LZMA_API(lzma_ret) lzma_auto_decoder(
* - LZMA_MEM_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_alone_decoder(
- lzma_stream *strm, uint64_t memlimit)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Single-call .xz Stream decoder
@@ -612,8 +587,6 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
* - LZMA_PROG_ERROR
*/
extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
- uint64_t *memlimit, uint32_t flags,
- const lzma_allocator *allocator,
- const uint8_t *in, size_t *in_pos, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size)
- lzma_nothrow lzma_attr_warn_unused_result;
+ uint64_t *memlimit, uint32_t flags, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out,
+ size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result;
diff --git a/node_modules/lzma-native/deps/include/lzma/delta.h b/node_modules/lzma-native/deps/include/lzma/delta.h
index f949750..5f13fab 100644
--- a/node_modules/lzma-native/deps/include/lzma/delta.h
+++ b/node_modules/lzma-native/deps/include/lzma/delta.h
@@ -13,17 +13,15 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Filter ID
*
* Filter ID of the Delta filter. This is used as lzma_filter.id.
*/
-#define LZMA_FILTER_DELTA LZMA_VLI_C(0x03)
-
+#define LZMA_FILTER_DELTA LZMA_VLI_C(0x03)
/**
* \brief Type of the delta calculation
@@ -32,10 +30,7 @@
* be, for example, delta of 16/32/64-bit little/big endian integers, but
* these are not currently planned since byte-wise delta is almost as good.
*/
-typedef enum {
- LZMA_DELTA_TYPE_BYTE
-} lzma_delta_type;
-
+typedef enum { LZMA_DELTA_TYPE_BYTE } lzma_delta_type;
/**
* \brief Options for the Delta filter
@@ -43,35 +38,35 @@ typedef enum {
* These options are needed by both encoder and decoder.
*/
typedef struct {
- /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */
- lzma_delta_type type;
+ /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */
+ lzma_delta_type type;
- /**
- * \brief Delta distance
- *
- * With the only currently supported type, LZMA_DELTA_TYPE_BYTE,
- * the distance is as bytes.
- *
- * Examples:
- * - 16-bit stereo audio: distance = 4 bytes
- * - 24-bit RGB image data: distance = 3 bytes
- */
- uint32_t dist;
-# define LZMA_DELTA_DIST_MIN 1
-# define LZMA_DELTA_DIST_MAX 256
+ /**
+ * \brief Delta distance
+ *
+ * With the only currently supported type, LZMA_DELTA_TYPE_BYTE,
+ * the distance is as bytes.
+ *
+ * Examples:
+ * - 16-bit stereo audio: distance = 4 bytes
+ * - 24-bit RGB image data: distance = 3 bytes
+ */
+ uint32_t dist;
+#define LZMA_DELTA_DIST_MIN 1
+#define LZMA_DELTA_DIST_MAX 256
- /*
- * Reserved space to allow possible future extensions without
- * breaking the ABI. You should not touch these, because the names
- * of these variables may change. These are and will never be used
- * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
- * uninitialized.
- */
- uint32_t reserved_int1;
- uint32_t reserved_int2;
- uint32_t reserved_int3;
- uint32_t reserved_int4;
- void *reserved_ptr1;
- void *reserved_ptr2;
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
+ * uninitialized.
+ */
+ uint32_t reserved_int1;
+ uint32_t reserved_int2;
+ uint32_t reserved_int3;
+ uint32_t reserved_int4;
+ void *reserved_ptr1;
+ void *reserved_ptr2;
} lzma_options_delta;
diff --git a/node_modules/lzma-native/deps/include/lzma/filter.h b/node_modules/lzma-native/deps/include/lzma/filter.h
index 1c3dccb..c548b1b 100644
--- a/node_modules/lzma-native/deps/include/lzma/filter.h
+++ b/node_modules/lzma-native/deps/include/lzma/filter.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Maximum number of filters in a chain
*
@@ -25,7 +24,6 @@
*/
#define LZMA_FILTERS_MAX 4
-
/**
* \brief Filter options
*
@@ -41,30 +39,29 @@
* array would make liblzma write past the end of the filters array.
*/
typedef struct {
- /**
- * \brief Filter ID
- *
- * Use constants whose name begin with `LZMA_FILTER_' to specify
- * different filters. In an array of lzma_filter structures, use
- * LZMA_VLI_UNKNOWN to indicate end of filters.
- *
- * \note This is not an enum, because on some systems enums
- * cannot be 64-bit.
- */
- lzma_vli id;
-
- /**
- * \brief Pointer to filter-specific options structure
- *
- * If the filter doesn't need options, set this to NULL. If id is
- * set to LZMA_VLI_UNKNOWN, options is ignored, and thus
- * doesn't need be initialized.
- */
- void *options;
+ /**
+ * \brief Filter ID
+ *
+ * Use constants whose name begin with `LZMA_FILTER_' to specify
+ * different filters. In an array of lzma_filter structures, use
+ * LZMA_VLI_UNKNOWN to indicate end of filters.
+ *
+ * \note This is not an enum, because on some systems enums
+ * cannot be 64-bit.
+ */
+ lzma_vli id;
+
+ /**
+ * \brief Pointer to filter-specific options structure
+ *
+ * If the filter doesn't need options, set this to NULL. If id is
+ * set to LZMA_VLI_UNKNOWN, options is ignored, and thus
+ * doesn't need be initialized.
+ */
+ void *options;
} lzma_filter;
-
/**
* \brief Test if the given Filter ID is supported for encoding
*
@@ -75,9 +72,8 @@ typedef struct {
* liblzma version and build. It would be useless, because the application
* couldn't know what kind of options the filter would need.
*/
-extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
- lzma_nothrow lzma_attr_const;
-
+extern LZMA_API(lzma_bool)
+ lzma_filter_encoder_is_supported(lzma_vli id) lzma_nothrow lzma_attr_const;
/**
* \brief Test if the given Filter ID is supported for decoding
@@ -85,9 +81,8 @@ extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
* Return true if the give Filter ID is supported for decoding by this
* liblzma build. Otherwise false is returned.
*/
-extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
- lzma_nothrow lzma_attr_const;
-
+extern LZMA_API(lzma_bool)
+ lzma_filter_decoder_is_supported(lzma_vli id) lzma_nothrow lzma_attr_const;
/**
* \brief Copy the filters array
@@ -116,10 +111,9 @@ extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
* is not NULL.
* - LZMA_PROG_ERROR: src or dest is NULL.
*/
-extern LZMA_API(lzma_ret) lzma_filters_copy(
- const lzma_filter *src, lzma_filter *dest,
- const lzma_allocator *allocator) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_filters_copy(const lzma_filter *src, lzma_filter *dest,
+ const lzma_allocator *allocator) lzma_nothrow;
/**
* \brief Calculate approximate memory requirements for raw encoder
@@ -137,8 +131,7 @@ extern LZMA_API(lzma_ret) lzma_filters_copy(
* UINT64_MAX is returned.
*/
extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
- lzma_nothrow lzma_attr_pure;
-
+ lzma_nothrow lzma_attr_pure;
/**
* \brief Calculate approximate memory requirements for raw decoder
@@ -156,8 +149,7 @@ extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
* UINT64_MAX is returned.
*/
extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
- lzma_nothrow lzma_attr_pure;
-
+ lzma_nothrow lzma_attr_pure;
/**
* \brief Initialize raw encoder
@@ -176,10 +168,9 @@ extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
* - LZMA_OPTIONS_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_raw_encoder(
- lzma_stream *strm, const lzma_filter *filters)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_raw_encoder(lzma_stream *strm, const lzma_filter *filters)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Initialize raw decoder
@@ -194,10 +185,9 @@ extern LZMA_API(lzma_ret) lzma_raw_encoder(
* - LZMA_OPTIONS_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_raw_decoder(
- lzma_stream *strm, const lzma_filter *filters)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_raw_decoder(lzma_stream *strm, const lzma_filter *filters)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Update the filter chain in the encoder
@@ -225,9 +215,9 @@ extern LZMA_API(lzma_ret) lzma_raw_decoder(
* - LZMA_OPTIONS_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_filters_update(
- lzma_stream *strm, const lzma_filter *filters) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_filters_update(lzma_stream *strm,
+ const lzma_filter *filters) lzma_nothrow;
/**
* \brief Single-call raw encoder
@@ -256,11 +246,11 @@ extern LZMA_API(lzma_ret) lzma_filters_update(
* works only for lzma_stream_buffer_encode(); raw encoder
* won't necessarily meet that bound.)
*/
-extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
- const lzma_filter *filters, const lzma_allocator *allocator,
- const uint8_t *in, size_t in_size, uint8_t *out,
- size_t *out_pos, size_t out_size) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_raw_buffer_encode(const lzma_filter *filters,
+ const lzma_allocator *allocator, const uint8_t *in,
+ size_t in_size, uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow;
/**
* \brief Single-call raw decoder
@@ -280,11 +270,11 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
* \param out_size Size of the out buffer; the first byte into
* which no data is written to is out[out_size].
*/
-extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
- const lzma_filter *filters, const lzma_allocator *allocator,
- const uint8_t *in, size_t *in_pos, size_t in_size,
- uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_raw_buffer_decode(const lzma_filter *filters,
+ const lzma_allocator *allocator, const uint8_t *in,
+ size_t *in_pos, size_t in_size, uint8_t *out,
+ size_t *out_pos, size_t out_size) lzma_nothrow;
/**
* \brief Get the size of the Filter Properties field
@@ -305,9 +295,9 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
* that this returns LZMA_OK while the following call to
* lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
*/
-extern LZMA_API(lzma_ret) lzma_properties_size(
- uint32_t *size, const lzma_filter *filter) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_properties_size(uint32_t *size,
+ const lzma_filter *filter) lzma_nothrow;
/**
* \brief Encode the Filter Properties field
@@ -331,9 +321,8 @@ extern LZMA_API(lzma_ret) lzma_properties_size(
* lzma_properties_encode() is not required, but it
* won't do any harm either.
*/
-extern LZMA_API(lzma_ret) lzma_properties_encode(
- const lzma_filter *filter, uint8_t *props) lzma_nothrow;
-
+extern LZMA_API(lzma_ret) lzma_properties_encode(const lzma_filter *filter,
+ uint8_t *props) lzma_nothrow;
/**
* \brief Decode the Filter Properties field
@@ -356,10 +345,10 @@ extern LZMA_API(lzma_ret) lzma_properties_encode(
* - LZMA_OPTIONS_ERROR
* - LZMA_MEM_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_properties_decode(
- lzma_filter *filter, const lzma_allocator *allocator,
- const uint8_t *props, size_t props_size) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_properties_decode(lzma_filter *filter, const lzma_allocator *allocator,
+ const uint8_t *props,
+ size_t props_size) lzma_nothrow;
/**
* \brief Calculate encoded size of a Filter Flags field
@@ -380,10 +369,9 @@ extern LZMA_API(lzma_ret) lzma_properties_decode(
* \note If you need to calculate size of List of Filter Flags,
* you need to loop over every lzma_filter entry.
*/
-extern LZMA_API(lzma_ret) lzma_filter_flags_size(
- uint32_t *size, const lzma_filter *filter)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Encode Filter Flags into given buffer
@@ -403,10 +391,9 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_size(
* buffer space (you should have checked it with
* lzma_filter_flags_size()).
*/
-extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
- uint8_t *out, size_t *out_pos, size_t out_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret) lzma_filter_flags_encode(
+ const lzma_filter *filter, uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Decode Filter Flags from given buffer
@@ -420,6 +407,5 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
* - LZMA_PROG_ERROR
*/
extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
- lzma_filter *filter, const lzma_allocator *allocator,
- const uint8_t *in, size_t *in_pos, size_t in_size)
- lzma_nothrow lzma_attr_warn_unused_result;
+ lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *in,
+ size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result;
diff --git a/node_modules/lzma-native/deps/include/lzma/hardware.h b/node_modules/lzma-native/deps/include/lzma/hardware.h
index 75d9b44..995246b 100644
--- a/node_modules/lzma-native/deps/include/lzma/hardware.h
+++ b/node_modules/lzma-native/deps/include/lzma/hardware.h
@@ -30,10 +30,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Get the total amount of physical memory (RAM) in bytes
*
@@ -49,7 +48,6 @@
*/
extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
-
/**
* \brief Get the number of processor cores or threads
*
diff --git a/node_modules/lzma-native/deps/include/lzma/index.h b/node_modules/lzma-native/deps/include/lzma/index.h
index d7da2f4..6e58311 100644
--- a/node_modules/lzma-native/deps/include/lzma/index.h
+++ b/node_modules/lzma-native/deps/include/lzma/index.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Opaque data type to hold the Index(es) and other information
*
@@ -36,238 +35,235 @@
*/
typedef struct lzma_index_s lzma_index;
-
/**
* \brief Iterator to get information about Blocks and Streams
*/
typedef struct {
- struct {
- /**
- * \brief Pointer to Stream Flags
- *
- * This is NULL if Stream Flags have not been set for
- * this Stream with lzma_index_stream_flags().
- */
- const lzma_stream_flags *flags;
-
- const void *reserved_ptr1;
- const void *reserved_ptr2;
- const void *reserved_ptr3;
-
- /**
- * \brief Stream number in the lzma_index
- *
- * The first Stream is 1.
- */
- lzma_vli number;
-
- /**
- * \brief Number of Blocks in the Stream
- *
- * If this is zero, the block structure below has
- * undefined values.
- */
- lzma_vli block_count;
-
- /**
- * \brief Compressed start offset of this Stream
- *
- * The offset is relative to the beginning of the lzma_index
- * (i.e. usually the beginning of the .xz file).
- */
- lzma_vli compressed_offset;
-
- /**
- * \brief Uncompressed start offset of this Stream
- *
- * The offset is relative to the beginning of the lzma_index
- * (i.e. usually the beginning of the .xz file).
- */
- lzma_vli uncompressed_offset;
-
- /**
- * \brief Compressed size of this Stream
- *
- * This includes all headers except the possible
- * Stream Padding after this Stream.
- */
- lzma_vli compressed_size;
-
- /**
- * \brief Uncompressed size of this Stream
- */
- lzma_vli uncompressed_size;
-
- /**
- * \brief Size of Stream Padding after this Stream
- *
- * If it hasn't been set with lzma_index_stream_padding(),
- * this defaults to zero. Stream Padding is always
- * a multiple of four bytes.
- */
- lzma_vli padding;
-
- lzma_vli reserved_vli1;
- lzma_vli reserved_vli2;
- lzma_vli reserved_vli3;
- lzma_vli reserved_vli4;
- } stream;
-
- struct {
- /**
- * \brief Block number in the file
- *
- * The first Block is 1.
- */
- lzma_vli number_in_file;
-
- /**
- * \brief Compressed start offset of this Block
- *
- * This offset is relative to the beginning of the
- * lzma_index (i.e. usually the beginning of the .xz file).
- * Normally this is where you should seek in the .xz file
- * to start decompressing this Block.
- */
- lzma_vli compressed_file_offset;
-
- /**
- * \brief Uncompressed start offset of this Block
- *
- * This offset is relative to the beginning of the lzma_index
- * (i.e. usually the beginning of the .xz file).
- *
- * When doing random-access reading, it is possible that
- * the target offset is not exactly at Block boundary. One
- * will need to compare the target offset against
- * uncompressed_file_offset or uncompressed_stream_offset,
- * and possibly decode and throw away some amount of data
- * before reaching the target offset.
- */
- lzma_vli uncompressed_file_offset;
-
- /**
- * \brief Block number in this Stream
- *
- * The first Block is 1.
- */
- lzma_vli number_in_stream;
-
- /**
- * \brief Compressed start offset of this Block
- *
- * This offset is relative to the beginning of the Stream
- * containing this Block.
- */
- lzma_vli compressed_stream_offset;
-
- /**
- * \brief Uncompressed start offset of this Block
- *
- * This offset is relative to the beginning of the Stream
- * containing this Block.
- */
- lzma_vli uncompressed_stream_offset;
-
- /**
- * \brief Uncompressed size of this Block
- *
- * You should pass this to the Block decoder if you will
- * decode this Block. It will allow the Block decoder to
- * validate the uncompressed size.
- */
- lzma_vli uncompressed_size;
-
- /**
- * \brief Unpadded size of this Block
- *
- * You should pass this to the Block decoder if you will
- * decode this Block. It will allow the Block decoder to
- * validate the unpadded size.
- */
- lzma_vli unpadded_size;
-
- /**
- * \brief Total compressed size
- *
- * This includes all headers and padding in this Block.
- * This is useful if you need to know how many bytes
- * the Block decoder will actually read.
- */
- lzma_vli total_size;
-
- lzma_vli reserved_vli1;
- lzma_vli reserved_vli2;
- lzma_vli reserved_vli3;
- lzma_vli reserved_vli4;
-
- const void *reserved_ptr1;
- const void *reserved_ptr2;
- const void *reserved_ptr3;
- const void *reserved_ptr4;
- } block;
-
- /*
- * Internal data which is used to store the state of the iterator.
- * The exact format may vary between liblzma versions, so don't
- * touch these in any way.
- */
- union {
- const void *p;
- size_t s;
- lzma_vli v;
- } internal[6];
+ struct {
+ /**
+ * \brief Pointer to Stream Flags
+ *
+ * This is NULL if Stream Flags have not been set for
+ * this Stream with lzma_index_stream_flags().
+ */
+ const lzma_stream_flags *flags;
+
+ const void *reserved_ptr1;
+ const void *reserved_ptr2;
+ const void *reserved_ptr3;
+
+ /**
+ * \brief Stream number in the lzma_index
+ *
+ * The first Stream is 1.
+ */
+ lzma_vli number;
+
+ /**
+ * \brief Number of Blocks in the Stream
+ *
+ * If this is zero, the block structure below has
+ * undefined values.
+ */
+ lzma_vli block_count;
+
+ /**
+ * \brief Compressed start offset of this Stream
+ *
+ * The offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli compressed_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Stream
+ *
+ * The offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli uncompressed_offset;
+
+ /**
+ * \brief Compressed size of this Stream
+ *
+ * This includes all headers except the possible
+ * Stream Padding after this Stream.
+ */
+ lzma_vli compressed_size;
+
+ /**
+ * \brief Uncompressed size of this Stream
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Size of Stream Padding after this Stream
+ *
+ * If it hasn't been set with lzma_index_stream_padding(),
+ * this defaults to zero. Stream Padding is always
+ * a multiple of four bytes.
+ */
+ lzma_vli padding;
+
+ lzma_vli reserved_vli1;
+ lzma_vli reserved_vli2;
+ lzma_vli reserved_vli3;
+ lzma_vli reserved_vli4;
+ } stream;
+
+ struct {
+ /**
+ * \brief Block number in the file
+ *
+ * The first Block is 1.
+ */
+ lzma_vli number_in_file;
+
+ /**
+ * \brief Compressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the
+ * lzma_index (i.e. usually the beginning of the .xz file).
+ * Normally this is where you should seek in the .xz file
+ * to start decompressing this Block.
+ */
+ lzma_vli compressed_file_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ *
+ * When doing random-access reading, it is possible that
+ * the target offset is not exactly at Block boundary. One
+ * will need to compare the target offset against
+ * uncompressed_file_offset or uncompressed_stream_offset,
+ * and possibly decode and throw away some amount of data
+ * before reaching the target offset.
+ */
+ lzma_vli uncompressed_file_offset;
+
+ /**
+ * \brief Block number in this Stream
+ *
+ * The first Block is 1.
+ */
+ lzma_vli number_in_stream;
+
+ /**
+ * \brief Compressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the Stream
+ * containing this Block.
+ */
+ lzma_vli compressed_stream_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the Stream
+ * containing this Block.
+ */
+ lzma_vli uncompressed_stream_offset;
+
+ /**
+ * \brief Uncompressed size of this Block
+ *
+ * You should pass this to the Block decoder if you will
+ * decode this Block. It will allow the Block decoder to
+ * validate the uncompressed size.
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Unpadded size of this Block
+ *
+ * You should pass this to the Block decoder if you will
+ * decode this Block. It will allow the Block decoder to
+ * validate the unpadded size.
+ */
+ lzma_vli unpadded_size;
+
+ /**
+ * \brief Total compressed size
+ *
+ * This includes all headers and padding in this Block.
+ * This is useful if you need to know how many bytes
+ * the Block decoder will actually read.
+ */
+ lzma_vli total_size;
+
+ lzma_vli reserved_vli1;
+ lzma_vli reserved_vli2;
+ lzma_vli reserved_vli3;
+ lzma_vli reserved_vli4;
+
+ const void *reserved_ptr1;
+ const void *reserved_ptr2;
+ const void *reserved_ptr3;
+ const void *reserved_ptr4;
+ } block;
+
+ /*
+ * Internal data which is used to store the state of the iterator.
+ * The exact format may vary between liblzma versions, so don't
+ * touch these in any way.
+ */
+ union {
+ const void *p;
+ size_t s;
+ lzma_vli v;
+ } internal[6];
} lzma_index_iter;
-
/**
* \brief Operation mode for lzma_index_iter_next()
*/
typedef enum {
- LZMA_INDEX_ITER_ANY = 0,
- /**<
- * \brief Get the next Block or Stream
- *
- * Go to the next Block if the current Stream has at least
- * one Block left. Otherwise go to the next Stream even if
- * it has no Blocks. If the Stream has no Blocks
- * (lzma_index_iter.stream.block_count == 0),
- * lzma_index_iter.block will have undefined values.
- */
-
- LZMA_INDEX_ITER_STREAM = 1,
- /**<
- * \brief Get the next Stream
- *
- * Go to the next Stream even if the current Stream has
- * unread Blocks left. If the next Stream has at least one
- * Block, the iterator will point to the first Block.
- * If there are no Blocks, lzma_index_iter.block will have
- * undefined values.
- */
-
- LZMA_INDEX_ITER_BLOCK = 2,
- /**<
- * \brief Get the next Block
- *
- * Go to the next Block if the current Stream has at least
- * one Block left. If the current Stream has no Blocks left,
- * the next Stream with at least one Block is located and
- * the iterator will be made to point to the first Block of
- * that Stream.
- */
-
- LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3
- /**<
- * \brief Get the next non-empty Block
- *
- * This is like LZMA_INDEX_ITER_BLOCK except that it will
- * skip Blocks whose Uncompressed Size is zero.
- */
+ LZMA_INDEX_ITER_ANY = 0,
+ /**<
+ * \brief Get the next Block or Stream
+ *
+ * Go to the next Block if the current Stream has at least
+ * one Block left. Otherwise go to the next Stream even if
+ * it has no Blocks. If the Stream has no Blocks
+ * (lzma_index_iter.stream.block_count == 0),
+ * lzma_index_iter.block will have undefined values.
+ */
+
+ LZMA_INDEX_ITER_STREAM = 1,
+ /**<
+ * \brief Get the next Stream
+ *
+ * Go to the next Stream even if the current Stream has
+ * unread Blocks left. If the next Stream has at least one
+ * Block, the iterator will point to the first Block.
+ * If there are no Blocks, lzma_index_iter.block will have
+ * undefined values.
+ */
+
+ LZMA_INDEX_ITER_BLOCK = 2,
+ /**<
+ * \brief Get the next Block
+ *
+ * Go to the next Block if the current Stream has at least
+ * one Block left. If the current Stream has no Blocks left,
+ * the next Stream with at least one Block is located and
+ * the iterator will be made to point to the first Block of
+ * that Stream.
+ */
+
+ LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3
+ /**<
+ * \brief Get the next non-empty Block
+ *
+ * This is like LZMA_INDEX_ITER_BLOCK except that it will
+ * skip Blocks whose Uncompressed Size is zero.
+ */
} lzma_index_iter_mode;
-
/**
* \brief Calculate memory usage of lzma_index
*
@@ -283,9 +279,8 @@ typedef enum {
* value may vary between CPU architectures and also between liblzma versions
* if the internal implementation is modified.
*/
-extern LZMA_API(uint64_t) lzma_index_memusage(
- lzma_vli streams, lzma_vli blocks) lzma_nothrow;
-
+extern LZMA_API(uint64_t)
+ lzma_index_memusage(lzma_vli streams, lzma_vli blocks) lzma_nothrow;
/**
* \brief Calculate the memory usage of an existing lzma_index
@@ -293,9 +288,7 @@ extern LZMA_API(uint64_t) lzma_index_memusage(
* This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
* lzma_index_block_count(i)).
*/
-extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
- lzma_nothrow;
-
+extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i) lzma_nothrow;
/**
* \brief Allocate and initialize a new lzma_index structure
@@ -303,18 +296,16 @@ extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
* \return On success, a pointer to an empty initialized lzma_index is
* returned. If allocation fails, NULL is returned.
*/
-extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
- lzma_nothrow;
-
+extern LZMA_API(lzma_index *)
+ lzma_index_init(const lzma_allocator *allocator) lzma_nothrow;
/**
* \brief Deallocate lzma_index
*
* If i is NULL, this does nothing.
*/
-extern LZMA_API(void) lzma_index_end(
- lzma_index *i, const lzma_allocator *allocator) lzma_nothrow;
-
+extern LZMA_API(void)
+ lzma_index_end(lzma_index *i, const lzma_allocator *allocator) lzma_nothrow;
/**
* \brief Add a new Block to lzma_index
@@ -341,10 +332,8 @@ extern LZMA_API(void) lzma_index_end(
* - LZMA_PROG_ERROR
*/
extern LZMA_API(lzma_ret) lzma_index_append(
- lzma_index *i, const lzma_allocator *allocator,
- lzma_vli unpadded_size, lzma_vli uncompressed_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+ lzma_index *i, const lzma_allocator *allocator, lzma_vli unpadded_size,
+ lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Set the Stream Flags
@@ -362,10 +351,10 @@ extern LZMA_API(lzma_ret) lzma_index_append(
* - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_index_stream_flags(
- lzma_index *i, const lzma_stream_flags *stream_flags)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_index_stream_flags(lzma_index *i,
+ const lzma_stream_flags *stream_flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Get the types of integrity Checks
@@ -377,9 +366,8 @@ extern LZMA_API(lzma_ret) lzma_index_stream_flags(
*
* The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
*/
-extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(uint32_t)
+ lzma_index_checks(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Set the amount of Stream Padding
@@ -394,17 +382,15 @@ extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
* - LZMA_DATA_ERROR: The file size would grow too big.
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_index_stream_padding(
- lzma_index *i, lzma_vli stream_padding)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Get the number of Streams
*/
-extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_index_stream_count(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the number of Blocks
@@ -412,18 +398,16 @@ extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
* This returns the total number of Blocks in lzma_index. To get number
* of Blocks in individual Streams, use lzma_index_iter.
*/
-extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_index_block_count(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the size of the Index field as bytes
*
* This is needed to verify the Backward Size field in the Stream Footer.
*/
-extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_index_size(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the total size of the Stream
@@ -432,9 +416,8 @@ extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
* were in a single Stream. This is useful if you are going to combine
* Blocks from multiple Streams into a single new Stream.
*/
-extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_index_stream_size(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the total size of the Blocks
@@ -442,9 +425,8 @@ extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
* This doesn't include the Stream Header, Stream Footer, Stream Padding,
* or Index fields.
*/
-extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_index_total_size(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the total size of the file
@@ -454,16 +436,14 @@ extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
* If multiple lzma_indexes have been combined, this includes also the headers
* of each separate Stream and the possible Stream Padding fields.
*/
-extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+extern LZMA_API(lzma_vli)
+ lzma_index_file_size(const lzma_index *i) lzma_nothrow lzma_attr_pure;
/**
* \brief Get the uncompressed size of the file
*/
extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
- lzma_nothrow lzma_attr_pure;
-
+ lzma_nothrow lzma_attr_pure;
/**
* \brief Initialize an iterator
@@ -484,9 +464,8 @@ extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
* It is safe to make copies of an initialized lzma_index_iter, for example,
* to easily restart reading at some particular position.
*/
-extern LZMA_API(void) lzma_index_iter_init(
- lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
-
+extern LZMA_API(void) lzma_index_iter_init(lzma_index_iter *iter,
+ const lzma_index *i) lzma_nothrow;
/**
* \brief Rewind the iterator
@@ -494,9 +473,8 @@ extern LZMA_API(void) lzma_index_iter_init(
* Rewind the iterator so that next call to lzma_index_iter_next() will
* return the first Block or Stream.
*/
-extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
- lzma_nothrow;
-
+extern LZMA_API(void)
+ lzma_index_iter_rewind(lzma_index_iter *iter) lzma_nothrow;
/**
* \brief Get the next Block or Stream
@@ -511,10 +489,9 @@ extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
* and this function returns true. If mode is set to an unknown
* value, *iter is not modified and this function returns true.
*/
-extern LZMA_API(lzma_bool) lzma_index_iter_next(
- lzma_index_iter *iter, lzma_index_iter_mode mode)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_bool)
+ lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Locate a Block
@@ -539,9 +516,8 @@ extern LZMA_API(lzma_bool) lzma_index_iter_next(
* If target is greater than the uncompressed size of the Stream, *iter
* is not modified, and this function returns true.
*/
-extern LZMA_API(lzma_bool) lzma_index_iter_locate(
- lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
-
+extern LZMA_API(lzma_bool)
+ lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
/**
* \brief Concatenate lzma_indexes
@@ -565,19 +541,17 @@ extern LZMA_API(lzma_bool) lzma_index_iter_locate(
* - LZMA_PROG_ERROR
*/
extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
- const lzma_allocator *allocator)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+ const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Duplicate lzma_index
*
* \return A copy of the lzma_index, or NULL if memory allocation failed.
*/
-extern LZMA_API(lzma_index *) lzma_index_dup(
- const lzma_index *i, const lzma_allocator *allocator)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_index *)
+ lzma_index_dup(const lzma_index *i, const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Initialize .xz Index encoder
@@ -593,10 +567,9 @@ extern LZMA_API(lzma_index *) lzma_index_dup(
* - LZMA_MEM_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_index_encoder(
- lzma_stream *strm, const lzma_index *i)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Initialize .xz Index decoder
@@ -621,10 +594,9 @@ extern LZMA_API(lzma_ret) lzma_index_encoder(
* - LZMA_MEMLIMIT_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_index_decoder(
- lzma_stream *strm, lzma_index **i, uint64_t memlimit)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Single-call .xz Index encoder
@@ -645,9 +617,9 @@ extern LZMA_API(lzma_ret) lzma_index_decoder(
* \note This function doesn't take allocator argument since all
* the internal data is allocated on stack.
*/
-extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
- uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_index_buffer_encode(const lzma_index *i, uint8_t *out, size_t *out_pos,
+ size_t out_size) lzma_nothrow;
/**
* \brief Single-call .xz Index decoder
@@ -676,7 +648,7 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
* - LZMA_DATA_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
- uint64_t *memlimit, const lzma_allocator *allocator,
- const uint8_t *in, size_t *in_pos, size_t in_size)
- lzma_nothrow;
+extern LZMA_API(lzma_ret)
+ lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit,
+ const lzma_allocator *allocator, const uint8_t *in,
+ size_t *in_pos, size_t in_size) lzma_nothrow;
diff --git a/node_modules/lzma-native/deps/include/lzma/index_hash.h b/node_modules/lzma-native/deps/include/lzma/index_hash.h
index 1d0688d..de398ce 100644
--- a/node_modules/lzma-native/deps/include/lzma/index_hash.h
+++ b/node_modules/lzma-native/deps/include/lzma/index_hash.h
@@ -16,7 +16,7 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
/**
@@ -24,7 +24,6 @@
*/
typedef struct lzma_index_hash_s lzma_index_hash;
-
/**
* \brief Allocate and initialize a new lzma_index_hash structure
*
@@ -37,17 +36,15 @@ typedef struct lzma_index_hash_s lzma_index_hash;
* pointer than the index_hash that was given as an argument.
*/
extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
- lzma_index_hash *index_hash, const lzma_allocator *allocator)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+ lzma_index_hash *index_hash,
+ const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Deallocate lzma_index_hash structure
*/
-extern LZMA_API(void) lzma_index_hash_end(
- lzma_index_hash *index_hash, const lzma_allocator *allocator)
- lzma_nothrow;
-
+extern LZMA_API(void)
+ lzma_index_hash_end(lzma_index_hash *index_hash,
+ const lzma_allocator *allocator) lzma_nothrow;
/**
* \brief Add a new Record to an Index hash
@@ -62,10 +59,9 @@ extern LZMA_API(void) lzma_index_hash_end(
* - LZMA_PROG_ERROR: Invalid arguments or this function is being
* used when lzma_index_hash_decode() has already been used.
*/
-extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
- lzma_vli unpadded_size, lzma_vli uncompressed_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret) lzma_index_hash_append(
+ lzma_index_hash *index_hash, lzma_vli unpadded_size,
+ lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Decode and validate the Index field
@@ -92,10 +88,9 @@ extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
* - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
* - LZMA_PROG_ERROR
*/
-extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
- const uint8_t *in, size_t *in_pos, size_t in_size)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret) lzma_index_hash_decode(
+ lzma_index_hash *index_hash, const uint8_t *in, size_t *in_pos,
+ size_t in_size) lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Get the size of the Index field as bytes
@@ -103,5 +98,4 @@ extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
* This is needed to verify the Backward Size field in the Stream Footer.
*/
extern LZMA_API(lzma_vli) lzma_index_hash_size(
- const lzma_index_hash *index_hash)
- lzma_nothrow lzma_attr_pure;
+ const lzma_index_hash *index_hash) lzma_nothrow lzma_attr_pure;
diff --git a/node_modules/lzma-native/deps/include/lzma/lzma12.h b/node_modules/lzma-native/deps/include/lzma/lzma12.h
index cbb4cc7..db0b712 100644
--- a/node_modules/lzma-native/deps/include/lzma/lzma12.h
+++ b/node_modules/lzma-native/deps/include/lzma/lzma12.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief LZMA1 Filter ID
*
@@ -27,7 +26,7 @@
* LZMA1 shouldn't be used for new applications unless you _really_ know
* what you are doing. LZMA2 is almost always a better choice.
*/
-#define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001)
+#define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001)
/**
* \brief LZMA2 Filter ID
@@ -37,8 +36,7 @@
* when trying to compress uncompressible data), possibility to change
* lc/lp/pb in the middle of encoding, and some other internal improvements.
*/
-#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
-
+#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
/**
* \brief Match finders
@@ -56,61 +54,60 @@
* lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
*/
typedef enum {
- LZMA_MF_HC3 = 0x03,
- /**<
- * \brief Hash Chain with 2- and 3-byte hashing
- *
- * Minimum nice_len: 3
- *
- * Memory usage:
- * - dict_size <= 16 MiB: dict_size * 7.5
- * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
- */
-
- LZMA_MF_HC4 = 0x04,
- /**<
- * \brief Hash Chain with 2-, 3-, and 4-byte hashing
- *
- * Minimum nice_len: 4
- *
- * Memory usage:
- * - dict_size <= 32 MiB: dict_size * 7.5
- * - dict_size > 32 MiB: dict_size * 6.5
- */
-
- LZMA_MF_BT2 = 0x12,
- /**<
- * \brief Binary Tree with 2-byte hashing
- *
- * Minimum nice_len: 2
- *
- * Memory usage: dict_size * 9.5
- */
-
- LZMA_MF_BT3 = 0x13,
- /**<
- * \brief Binary Tree with 2- and 3-byte hashing
- *
- * Minimum nice_len: 3
- *
- * Memory usage:
- * - dict_size <= 16 MiB: dict_size * 11.5
- * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
- */
-
- LZMA_MF_BT4 = 0x14
- /**<
- * \brief Binary Tree with 2-, 3-, and 4-byte hashing
- *
- * Minimum nice_len: 4
- *
- * Memory usage:
- * - dict_size <= 32 MiB: dict_size * 11.5
- * - dict_size > 32 MiB: dict_size * 10.5
- */
+ LZMA_MF_HC3 = 0x03,
+ /**<
+ * \brief Hash Chain with 2- and 3-byte hashing
+ *
+ * Minimum nice_len: 3
+ *
+ * Memory usage:
+ * - dict_size <= 16 MiB: dict_size * 7.5
+ * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
+ */
+
+ LZMA_MF_HC4 = 0x04,
+ /**<
+ * \brief Hash Chain with 2-, 3-, and 4-byte hashing
+ *
+ * Minimum nice_len: 4
+ *
+ * Memory usage:
+ * - dict_size <= 32 MiB: dict_size * 7.5
+ * - dict_size > 32 MiB: dict_size * 6.5
+ */
+
+ LZMA_MF_BT2 = 0x12,
+ /**<
+ * \brief Binary Tree with 2-byte hashing
+ *
+ * Minimum nice_len: 2
+ *
+ * Memory usage: dict_size * 9.5
+ */
+
+ LZMA_MF_BT3 = 0x13,
+ /**<
+ * \brief Binary Tree with 2- and 3-byte hashing
+ *
+ * Minimum nice_len: 3
+ *
+ * Memory usage:
+ * - dict_size <= 16 MiB: dict_size * 11.5
+ * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
+ */
+
+ LZMA_MF_BT4 = 0x14
+ /**<
+ * \brief Binary Tree with 2-, 3-, and 4-byte hashing
+ *
+ * Minimum nice_len: 4
+ *
+ * Memory usage:
+ * - dict_size <= 32 MiB: dict_size * 11.5
+ * - dict_size > 32 MiB: dict_size * 10.5
+ */
} lzma_match_finder;
-
/**
* \brief Test if given match finder is supported
*
@@ -126,8 +123,7 @@ typedef enum {
* match finders don't need.
*/
extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
- lzma_nothrow lzma_attr_const;
-
+ lzma_nothrow lzma_attr_const;
/**
* \brief Compression modes
@@ -136,25 +132,24 @@ extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
* finder.
*/
typedef enum {
- LZMA_MODE_FAST = 1,
- /**<
- * \brief Fast compression
- *
- * Fast mode is usually at its best when combined with
- * a hash chain match finder.
- */
-
- LZMA_MODE_NORMAL = 2
- /**<
- * \brief Normal compression
- *
- * This is usually notably slower than fast mode. Use this
- * together with binary tree match finders to expose the
- * full potential of the LZMA1 or LZMA2 encoder.
- */
+ LZMA_MODE_FAST = 1,
+ /**<
+ * \brief Fast compression
+ *
+ * Fast mode is usually at its best when combined with
+ * a hash chain match finder.
+ */
+
+ LZMA_MODE_NORMAL = 2
+ /**<
+ * \brief Normal compression
+ *
+ * This is usually notably slower than fast mode. Use this
+ * together with binary tree match finders to expose the
+ * full potential of the LZMA1 or LZMA2 encoder.
+ */
} lzma_mode;
-
/**
* \brief Test if given compression mode is supported
*
@@ -167,9 +162,8 @@ typedef enum {
* mode, which the application developer wasn't aware, could require giving
* additional options to the encoder that the older modes don't need.
*/
-extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
- lzma_nothrow lzma_attr_const;
-
+extern LZMA_API(lzma_bool)
+ lzma_mode_is_supported(lzma_mode mode) lzma_nothrow lzma_attr_const;
/**
* \brief Options specific to the LZMA1 and LZMA2 filters
@@ -183,222 +177,221 @@ extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
* preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
*/
typedef struct {
- /**
- * \brief Dictionary size in bytes
- *
- * Dictionary size indicates how many bytes of the recently processed
- * uncompressed data is kept in memory. One method to reduce size of
- * the uncompressed data is to store distance-length pairs, which
- * indicate what data to repeat from the dictionary buffer. Thus,
- * the bigger the dictionary, the better the compression ratio
- * usually is.
- *
- * Maximum size of the dictionary depends on multiple things:
- * - Memory usage limit
- * - Available address space (not a problem on 64-bit systems)
- * - Selected match finder (encoder only)
- *
- * Currently the maximum dictionary size for encoding is 1.5 GiB
- * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
- * systems for certain match finder implementation reasons. In the
- * future, there may be match finders that support bigger
- * dictionaries.
- *
- * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
- * UINT32_MAX), so increasing the maximum dictionary size of the
- * encoder won't cause problems for old decoders.
- *
- * Because extremely small dictionaries sizes would have unneeded
- * overhead in the decoder, the minimum dictionary size is 4096 bytes.
- *
- * \note When decoding, too big dictionary does no other harm
- * than wasting memory.
- */
- uint32_t dict_size;
-# define LZMA_DICT_SIZE_MIN UINT32_C(4096)
-# define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23)
-
- /**
- * \brief Pointer to an initial dictionary
- *
- * It is possible to initialize the LZ77 history window using
- * a preset dictionary. It is useful when compressing many
- * similar, relatively small chunks of data independently from
- * each other. The preset dictionary should contain typical
- * strings that occur in the files being compressed. The most
- * probable strings should be near the end of the preset dictionary.
- *
- * This feature should be used only in special situations. For
- * now, it works correctly only with raw encoding and decoding.
- * Currently none of the container formats supported by
- * liblzma allow preset dictionary when decoding, thus if
- * you create a .xz or .lzma file with preset dictionary, it
- * cannot be decoded with the regular decoder functions. In the
- * future, the .xz format will likely get support for preset
- * dictionary though.
- */
- const uint8_t *preset_dict;
-
- /**
- * \brief Size of the preset dictionary
- *
- * Specifies the size of the preset dictionary. If the size is
- * bigger than dict_size, only the last dict_size bytes are
- * processed.
- *
- * This variable is read only when preset_dict is not NULL.
- * If preset_dict is not NULL but preset_dict_size is zero,
- * no preset dictionary is used (identical to only setting
- * preset_dict to NULL).
- */
- uint32_t preset_dict_size;
-
- /**
- * \brief Number of literal context bits
- *
- * How many of the highest bits of the previous uncompressed
- * eight-bit byte (also known as `literal') are taken into
- * account when predicting the bits of the next literal.
- *
- * E.g. in typical English text, an upper-case letter is
- * often followed by a lower-case letter, and a lower-case
- * letter is usually followed by another lower-case letter.
- * In the US-ASCII character set, the highest three bits are 010
- * for upper-case letters and 011 for lower-case letters.
- * When lc is at least 3, the literal coding can take advantage of
- * this property in the uncompressed data.
- *
- * There is a limit that applies to literal context bits and literal
- * position bits together: lc + lp <= 4. Without this limit the
- * decoding could become very slow, which could have security related
- * results in some cases like email servers doing virus scanning.
- * This limit also simplifies the internal implementation in liblzma.
- *
- * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
- * lc would be 8). It is not possible to decode such streams with
- * liblzma.
- */
- uint32_t lc;
-# define LZMA_LCLP_MIN 0
-# define LZMA_LCLP_MAX 4
-# define LZMA_LC_DEFAULT 3
-
- /**
- * \brief Number of literal position bits
- *
- * lp affects what kind of alignment in the uncompressed data is
- * assumed when encoding literals. A literal is a single 8-bit byte.
- * See pb below for more information about alignment.
- */
- uint32_t lp;
-# define LZMA_LP_DEFAULT 0
-
- /**
- * \brief Number of position bits
- *
- * pb affects what kind of alignment in the uncompressed data is
- * assumed in general. The default means four-byte alignment
- * (2^ pb =2^2=4), which is often a good choice when there's
- * no better guess.
- *
- * When the aligment is known, setting pb accordingly may reduce
- * the file size a little. E.g. with text files having one-byte
- * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
- * improve compression slightly. For UTF-16 text, pb=1 is a good
- * choice. If the alignment is an odd number like 3 bytes, pb=0
- * might be the best choice.
- *
- * Even though the assumed alignment can be adjusted with pb and
- * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
- * It might be worth taking into account when designing file formats
- * that are likely to be often compressed with LZMA1 or LZMA2.
- */
- uint32_t pb;
-# define LZMA_PB_MIN 0
-# define LZMA_PB_MAX 4
-# define LZMA_PB_DEFAULT 2
-
- /** Compression mode */
- lzma_mode mode;
-
- /**
- * \brief Nice length of a match
- *
- * This determines how many bytes the encoder compares from the match
- * candidates when looking for the best match. Once a match of at
- * least nice_len bytes long is found, the encoder stops looking for
- * better candidates and encodes the match. (Naturally, if the found
- * match is actually longer than nice_len, the actual length is
- * encoded; it's not truncated to nice_len.)
- *
- * Bigger values usually increase the compression ratio and
- * compression time. For most files, 32 to 128 is a good value,
- * which gives very good compression ratio at good speed.
- *
- * The exact minimum value depends on the match finder. The maximum
- * is 273, which is the maximum length of a match that LZMA1 and
- * LZMA2 can encode.
- */
- uint32_t nice_len;
-
- /** Match finder ID */
- lzma_match_finder mf;
-
- /**
- * \brief Maximum search depth in the match finder
- *
- * For every input byte, match finder searches through the hash chain
- * or binary tree in a loop, each iteration going one step deeper in
- * the chain or tree. The searching stops if
- * - a match of at least nice_len bytes long is found;
- * - all match candidates from the hash chain or binary tree have
- * been checked; or
- * - maximum search depth is reached.
- *
- * Maximum search depth is needed to prevent the match finder from
- * wasting too much time in case there are lots of short match
- * candidates. On the other hand, stopping the search before all
- * candidates have been checked can reduce compression ratio.
- *
- * Setting depth to zero tells liblzma to use an automatic default
- * value, that depends on the selected match finder and nice_len.
- * The default is in the range [4, 200] or so (it may vary between
- * liblzma versions).
- *
- * Using a bigger depth value than the default can increase
- * compression ratio in some cases. There is no strict maximum value,
- * but high values (thousands or millions) should be used with care:
- * the encoder could remain fast enough with typical input, but
- * malicious input could cause the match finder to slow down
- * dramatically, possibly creating a denial of service attack.
- */
- uint32_t depth;
-
- /*
- * Reserved space to allow possible future extensions without
- * breaking the ABI. You should not touch these, because the names
- * of these variables may change. These are and will never be used
- * with the currently supported options, so it is safe to leave these
- * uninitialized.
- */
- uint32_t reserved_int1;
- uint32_t reserved_int2;
- uint32_t reserved_int3;
- uint32_t reserved_int4;
- uint32_t reserved_int5;
- uint32_t reserved_int6;
- uint32_t reserved_int7;
- uint32_t reserved_int8;
- lzma_reserved_enum reserved_enum1;
- lzma_reserved_enum reserved_enum2;
- lzma_reserved_enum reserved_enum3;
- lzma_reserved_enum reserved_enum4;
- void *reserved_ptr1;
- void *reserved_ptr2;
+ /**
+ * \brief Dictionary size in bytes
+ *
+ * Dictionary size indicates how many bytes of the recently processed
+ * uncompressed data is kept in memory. One method to reduce size of
+ * the uncompressed data is to store distance-length pairs, which
+ * indicate what data to repeat from the dictionary buffer. Thus,
+ * the bigger the dictionary, the better the compression ratio
+ * usually is.
+ *
+ * Maximum size of the dictionary depends on multiple things:
+ * - Memory usage limit
+ * - Available address space (not a problem on 64-bit systems)
+ * - Selected match finder (encoder only)
+ *
+ * Currently the maximum dictionary size for encoding is 1.5 GiB
+ * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
+ * systems for certain match finder implementation reasons. In the
+ * future, there may be match finders that support bigger
+ * dictionaries.
+ *
+ * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
+ * UINT32_MAX), so increasing the maximum dictionary size of the
+ * encoder won't cause problems for old decoders.
+ *
+ * Because extremely small dictionaries sizes would have unneeded
+ * overhead in the decoder, the minimum dictionary size is 4096 bytes.
+ *
+ * \note When decoding, too big dictionary does no other harm
+ * than wasting memory.
+ */
+ uint32_t dict_size;
+#define LZMA_DICT_SIZE_MIN UINT32_C(4096)
+#define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23)
+
+ /**
+ * \brief Pointer to an initial dictionary
+ *
+ * It is possible to initialize the LZ77 history window using
+ * a preset dictionary. It is useful when compressing many
+ * similar, relatively small chunks of data independently from
+ * each other. The preset dictionary should contain typical
+ * strings that occur in the files being compressed. The most
+ * probable strings should be near the end of the preset dictionary.
+ *
+ * This feature should be used only in special situations. For
+ * now, it works correctly only with raw encoding and decoding.
+ * Currently none of the container formats supported by
+ * liblzma allow preset dictionary when decoding, thus if
+ * you create a .xz or .lzma file with preset dictionary, it
+ * cannot be decoded with the regular decoder functions. In the
+ * future, the .xz format will likely get support for preset
+ * dictionary though.
+ */
+ const uint8_t *preset_dict;
+
+ /**
+ * \brief Size of the preset dictionary
+ *
+ * Specifies the size of the preset dictionary. If the size is
+ * bigger than dict_size, only the last dict_size bytes are
+ * processed.
+ *
+ * This variable is read only when preset_dict is not NULL.
+ * If preset_dict is not NULL but preset_dict_size is zero,
+ * no preset dictionary is used (identical to only setting
+ * preset_dict to NULL).
+ */
+ uint32_t preset_dict_size;
+
+ /**
+ * \brief Number of literal context bits
+ *
+ * How many of the highest bits of the previous uncompressed
+ * eight-bit byte (also known as `literal') are taken into
+ * account when predicting the bits of the next literal.
+ *
+ * E.g. in typical English text, an upper-case letter is
+ * often followed by a lower-case letter, and a lower-case
+ * letter is usually followed by another lower-case letter.
+ * In the US-ASCII character set, the highest three bits are 010
+ * for upper-case letters and 011 for lower-case letters.
+ * When lc is at least 3, the literal coding can take advantage of
+ * this property in the uncompressed data.
+ *
+ * There is a limit that applies to literal context bits and literal
+ * position bits together: lc + lp <= 4. Without this limit the
+ * decoding could become very slow, which could have security related
+ * results in some cases like email servers doing virus scanning.
+ * This limit also simplifies the internal implementation in liblzma.
+ *
+ * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
+ * lc would be 8). It is not possible to decode such streams with
+ * liblzma.
+ */
+ uint32_t lc;
+#define LZMA_LCLP_MIN 0
+#define LZMA_LCLP_MAX 4
+#define LZMA_LC_DEFAULT 3
+
+ /**
+ * \brief Number of literal position bits
+ *
+ * lp affects what kind of alignment in the uncompressed data is
+ * assumed when encoding literals. A literal is a single 8-bit byte.
+ * See pb below for more information about alignment.
+ */
+ uint32_t lp;
+#define LZMA_LP_DEFAULT 0
+
+ /**
+ * \brief Number of position bits
+ *
+ * pb affects what kind of alignment in the uncompressed data is
+ * assumed in general. The default means four-byte alignment
+ * (2^ pb =2^2=4), which is often a good choice when there's
+ * no better guess.
+ *
+ * When the aligment is known, setting pb accordingly may reduce
+ * the file size a little. E.g. with text files having one-byte
+ * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
+ * improve compression slightly. For UTF-16 text, pb=1 is a good
+ * choice. If the alignment is an odd number like 3 bytes, pb=0
+ * might be the best choice.
+ *
+ * Even though the assumed alignment can be adjusted with pb and
+ * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
+ * It might be worth taking into account when designing file formats
+ * that are likely to be often compressed with LZMA1 or LZMA2.
+ */
+ uint32_t pb;
+#define LZMA_PB_MIN 0
+#define LZMA_PB_MAX 4
+#define LZMA_PB_DEFAULT 2
+
+ /** Compression mode */
+ lzma_mode mode;
+
+ /**
+ * \brief Nice length of a match
+ *
+ * This determines how many bytes the encoder compares from the match
+ * candidates when looking for the best match. Once a match of at
+ * least nice_len bytes long is found, the encoder stops looking for
+ * better candidates and encodes the match. (Naturally, if the found
+ * match is actually longer than nice_len, the actual length is
+ * encoded; it's not truncated to nice_len.)
+ *
+ * Bigger values usually increase the compression ratio and
+ * compression time. For most files, 32 to 128 is a good value,
+ * which gives very good compression ratio at good speed.
+ *
+ * The exact minimum value depends on the match finder. The maximum
+ * is 273, which is the maximum length of a match that LZMA1 and
+ * LZMA2 can encode.
+ */
+ uint32_t nice_len;
+
+ /** Match finder ID */
+ lzma_match_finder mf;
+
+ /**
+ * \brief Maximum search depth in the match finder
+ *
+ * For every input byte, match finder searches through the hash chain
+ * or binary tree in a loop, each iteration going one step deeper in
+ * the chain or tree. The searching stops if
+ * - a match of at least nice_len bytes long is found;
+ * - all match candidates from the hash chain or binary tree have
+ * been checked; or
+ * - maximum search depth is reached.
+ *
+ * Maximum search depth is needed to prevent the match finder from
+ * wasting too much time in case there are lots of short match
+ * candidates. On the other hand, stopping the search before all
+ * candidates have been checked can reduce compression ratio.
+ *
+ * Setting depth to zero tells liblzma to use an automatic default
+ * value, that depends on the selected match finder and nice_len.
+ * The default is in the range [4, 200] or so (it may vary between
+ * liblzma versions).
+ *
+ * Using a bigger depth value than the default can increase
+ * compression ratio in some cases. There is no strict maximum value,
+ * but high values (thousands or millions) should be used with care:
+ * the encoder could remain fast enough with typical input, but
+ * malicious input could cause the match finder to slow down
+ * dramatically, possibly creating a denial of service attack.
+ */
+ uint32_t depth;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * with the currently supported options, so it is safe to leave these
+ * uninitialized.
+ */
+ uint32_t reserved_int1;
+ uint32_t reserved_int2;
+ uint32_t reserved_int3;
+ uint32_t reserved_int4;
+ uint32_t reserved_int5;
+ uint32_t reserved_int6;
+ uint32_t reserved_int7;
+ uint32_t reserved_int8;
+ lzma_reserved_enum reserved_enum1;
+ lzma_reserved_enum reserved_enum2;
+ lzma_reserved_enum reserved_enum3;
+ lzma_reserved_enum reserved_enum4;
+ void *reserved_ptr1;
+ void *reserved_ptr2;
} lzma_options_lzma;
-
/**
* \brief Set a compression preset to lzma_options_lzma structure
*
@@ -416,5 +409,5 @@ typedef struct {
* \return On success, false is returned. If the preset is not
* supported, true is returned.
*/
-extern LZMA_API(lzma_bool) lzma_lzma_preset(
- lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
+extern LZMA_API(lzma_bool)
+ lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
diff --git a/node_modules/lzma-native/deps/include/lzma/stream_flags.h b/node_modules/lzma-native/deps/include/lzma/stream_flags.h
index 8454658..1214909 100644
--- a/node_modules/lzma-native/deps/include/lzma/stream_flags.h
+++ b/node_modules/lzma-native/deps/include/lzma/stream_flags.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Size of Stream Header and Stream Footer
*
@@ -26,85 +25,83 @@
*/
#define LZMA_STREAM_HEADER_SIZE 12
-
/**
* \brief Options for encoding/decoding Stream Header and Stream Footer
*/
typedef struct {
- /**
- * \brief Stream Flags format version
- *
- * To prevent API and ABI breakages if new features are needed in
- * Stream Header or Stream Footer, a version number is used to
- * indicate which fields in this structure are in use. For now,
- * version must always be zero. With non-zero version, the
- * lzma_stream_header_encode() and lzma_stream_footer_encode()
- * will return LZMA_OPTIONS_ERROR.
- *
- * lzma_stream_header_decode() and lzma_stream_footer_decode()
- * will always set this to the lowest value that supports all the
- * features indicated by the Stream Flags field. The application
- * must check that the version number set by the decoding functions
- * is supported by the application. Otherwise it is possible that
- * the application will decode the Stream incorrectly.
- */
- uint32_t version;
-
- /**
- * \brief Backward Size
- *
- * Backward Size must be a multiple of four bytes. In this Stream
- * format version, Backward Size is the size of the Index field.
- *
- * Backward Size isn't actually part of the Stream Flags field, but
- * it is convenient to include in this structure anyway. Backward
- * Size is present only in the Stream Footer. There is no need to
- * initialize backward_size when encoding Stream Header.
- *
- * lzma_stream_header_decode() always sets backward_size to
- * LZMA_VLI_UNKNOWN so that it is convenient to use
- * lzma_stream_flags_compare() when both Stream Header and Stream
- * Footer have been decoded.
- */
- lzma_vli backward_size;
-# define LZMA_BACKWARD_SIZE_MIN 4
-# define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34)
-
- /**
- * \brief Check ID
- *
- * This indicates the type of the integrity check calculated from
- * uncompressed data.
- */
- lzma_check check;
-
- /*
- * Reserved space to allow possible future extensions without
- * breaking the ABI. You should not touch these, because the
- * names of these variables may change.
- *
- * (We will never be able to use all of these since Stream Flags
- * is just two bytes plus Backward Size of four bytes. But it's
- * nice to have the proper types when they are needed.)
- */
- lzma_reserved_enum reserved_enum1;
- lzma_reserved_enum reserved_enum2;
- lzma_reserved_enum reserved_enum3;
- lzma_reserved_enum reserved_enum4;
- lzma_bool reserved_bool1;
- lzma_bool reserved_bool2;
- lzma_bool reserved_bool3;
- lzma_bool reserved_bool4;
- lzma_bool reserved_bool5;
- lzma_bool reserved_bool6;
- lzma_bool reserved_bool7;
- lzma_bool reserved_bool8;
- uint32_t reserved_int1;
- uint32_t reserved_int2;
+ /**
+ * \brief Stream Flags format version
+ *
+ * To prevent API and ABI breakages if new features are needed in
+ * Stream Header or Stream Footer, a version number is used to
+ * indicate which fields in this structure are in use. For now,
+ * version must always be zero. With non-zero version, the
+ * lzma_stream_header_encode() and lzma_stream_footer_encode()
+ * will return LZMA_OPTIONS_ERROR.
+ *
+ * lzma_stream_header_decode() and lzma_stream_footer_decode()
+ * will always set this to the lowest value that supports all the
+ * features indicated by the Stream Flags field. The application
+ * must check that the version number set by the decoding functions
+ * is supported by the application. Otherwise it is possible that
+ * the application will decode the Stream incorrectly.
+ */
+ uint32_t version;
+
+ /**
+ * \brief Backward Size
+ *
+ * Backward Size must be a multiple of four bytes. In this Stream
+ * format version, Backward Size is the size of the Index field.
+ *
+ * Backward Size isn't actually part of the Stream Flags field, but
+ * it is convenient to include in this structure anyway. Backward
+ * Size is present only in the Stream Footer. There is no need to
+ * initialize backward_size when encoding Stream Header.
+ *
+ * lzma_stream_header_decode() always sets backward_size to
+ * LZMA_VLI_UNKNOWN so that it is convenient to use
+ * lzma_stream_flags_compare() when both Stream Header and Stream
+ * Footer have been decoded.
+ */
+ lzma_vli backward_size;
+#define LZMA_BACKWARD_SIZE_MIN 4
+#define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34)
+
+ /**
+ * \brief Check ID
+ *
+ * This indicates the type of the integrity check calculated from
+ * uncompressed data.
+ */
+ lzma_check check;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the
+ * names of these variables may change.
+ *
+ * (We will never be able to use all of these since Stream Flags
+ * is just two bytes plus Backward Size of four bytes. But it's
+ * nice to have the proper types when they are needed.)
+ */
+ lzma_reserved_enum reserved_enum1;
+ lzma_reserved_enum reserved_enum2;
+ lzma_reserved_enum reserved_enum3;
+ lzma_reserved_enum reserved_enum4;
+ lzma_bool reserved_bool1;
+ lzma_bool reserved_bool2;
+ lzma_bool reserved_bool3;
+ lzma_bool reserved_bool4;
+ lzma_bool reserved_bool5;
+ lzma_bool reserved_bool6;
+ lzma_bool reserved_bool7;
+ lzma_bool reserved_bool8;
+ uint32_t reserved_int1;
+ uint32_t reserved_int2;
} lzma_stream_flags;
-
/**
* \brief Encode Stream Header
*
@@ -119,10 +116,9 @@ typedef struct {
* this liblzma version.
* - LZMA_PROG_ERROR: Invalid options.
*/
-extern LZMA_API(lzma_ret) lzma_stream_header_encode(
- const lzma_stream_flags *options, uint8_t *out)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Encode Stream Footer
@@ -136,10 +132,9 @@ extern LZMA_API(lzma_ret) lzma_stream_header_encode(
* this liblzma version.
* - LZMA_PROG_ERROR: Invalid options.
*/
-extern LZMA_API(lzma_ret) lzma_stream_footer_encode(
- const lzma_stream_flags *options, uint8_t *out)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Decode Stream Header
@@ -171,10 +166,9 @@ extern LZMA_API(lzma_ret) lzma_stream_footer_encode(
* LZMA_FORMAT_ERROR is returned by lzma_stream_header_decode()
* when decoding non-first Stream.
*/
-extern LZMA_API(lzma_ret) lzma_stream_header_decode(
- lzma_stream_flags *options, const uint8_t *in)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Decode Stream Footer
@@ -198,10 +192,9 @@ extern LZMA_API(lzma_ret) lzma_stream_header_decode(
* is corrupt (possibly truncated). Stream decoder in liblzma
* uses LZMA_DATA_ERROR in this situation.
*/
-extern LZMA_API(lzma_ret) lzma_stream_footer_decode(
- lzma_stream_flags *options, const uint8_t *in)
- lzma_nothrow lzma_attr_warn_unused_result;
-
+extern LZMA_API(lzma_ret)
+ lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
+ lzma_nothrow lzma_attr_warn_unused_result;
/**
* \brief Compare two lzma_stream_flags structures
@@ -218,6 +211,6 @@ extern LZMA_API(lzma_ret) lzma_stream_footer_decode(
* - LZMA_PROG_ERROR: Invalid value, e.g. invalid check or
* backward_size.
*/
-extern LZMA_API(lzma_ret) lzma_stream_flags_compare(
- const lzma_stream_flags *a, const lzma_stream_flags *b)
- lzma_nothrow lzma_attr_pure;
+extern LZMA_API(lzma_ret) lzma_stream_flags_compare(const lzma_stream_flags *a,
+ const lzma_stream_flags *b)
+ lzma_nothrow lzma_attr_pure;
diff --git a/node_modules/lzma-native/deps/include/lzma/version.h b/node_modules/lzma-native/deps/include/lzma/version.h
index 6db2efb..f918477 100644
--- a/node_modules/lzma-native/deps/include/lzma/version.h
+++ b/node_modules/lzma-native/deps/include/lzma/version.h
@@ -13,10 +13,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/*
* Version number split into components
*/
@@ -26,10 +25,9 @@
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
#ifndef LZMA_VERSION_COMMIT
-# define LZMA_VERSION_COMMIT ""
+#define LZMA_VERSION_COMMIT ""
#endif
-
/*
* Map symbolic stability levels to integers.
*/
@@ -37,7 +35,6 @@
#define LZMA_VERSION_STABILITY_BETA 1
#define LZMA_VERSION_STABILITY_STABLE 2
-
/**
* \brief Compile-time version number
*
@@ -54,31 +51,29 @@
* \note The version number of liblzma has nothing to with
* the version number of Igor Pavlov's LZMA SDK.
*/
-#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
- + LZMA_VERSION_MINOR * UINT32_C(10000) \
- + LZMA_VERSION_PATCH * UINT32_C(10) \
- + LZMA_VERSION_STABILITY)
-
+#define LZMA_VERSION \
+ (LZMA_VERSION_MAJOR * UINT32_C(10000000) + \
+ LZMA_VERSION_MINOR * UINT32_C(10000) + LZMA_VERSION_PATCH * UINT32_C(10) + \
+ LZMA_VERSION_STABILITY)
/*
* Macros to construct the compile-time version string
*/
#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
-# define LZMA_VERSION_STABILITY_STRING "alpha"
+#define LZMA_VERSION_STABILITY_STRING "alpha"
#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
-# define LZMA_VERSION_STABILITY_STRING "beta"
+#define LZMA_VERSION_STABILITY_STRING "beta"
#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
-# define LZMA_VERSION_STABILITY_STRING ""
+#define LZMA_VERSION_STABILITY_STRING ""
#else
-# error Incorrect LZMA_VERSION_STABILITY
+#error Incorrect LZMA_VERSION_STABILITY
#endif
-#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
- #major "." #minor "." #patch stability commit
-
-#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
- LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
+#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
+ #major "." #minor "." #patch stability commit
+#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
+ LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
/**
* \brief Compile-time version as a string
@@ -89,11 +84,10 @@
* "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
* in LZMA_VERSION macro.
*/
-#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
- LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
- LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
- LZMA_VERSION_COMMIT)
-
+#define LZMA_VERSION_STRING \
+ LZMA_VERSION_STRING_C(LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
+ LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
+ LZMA_VERSION_COMMIT)
/* #ifndef is needed for use with windres (MinGW or Cygwin). */
#ifndef LZMA_H_INTERNAL_RC
@@ -105,9 +99,8 @@
* This allows the application to compare if it was built against the same,
* older, or newer version of liblzma that is currently running.
*/
-extern LZMA_API(uint32_t) lzma_version_number(void)
- lzma_nothrow lzma_attr_const;
-
+extern LZMA_API(uint32_t)
+ lzma_version_number(void) lzma_nothrow lzma_attr_const;
/**
* \brief Run-time version as a string
@@ -115,7 +108,7 @@ extern LZMA_API(uint32_t) lzma_version_number(void)
* This function may be useful if you want to display which version of
* liblzma your application is currently using.
*/
-extern LZMA_API(const char *) lzma_version_string(void)
- lzma_nothrow lzma_attr_const;
+extern LZMA_API(const char *)
+ lzma_version_string(void) lzma_nothrow lzma_attr_const;
#endif
diff --git a/node_modules/lzma-native/deps/include/lzma/vli.h b/node_modules/lzma-native/deps/include/lzma/vli.h
index bcb7b2d..142f1c4 100644
--- a/node_modules/lzma-native/deps/include/lzma/vli.h
+++ b/node_modules/lzma-native/deps/include/lzma/vli.h
@@ -24,10 +24,9 @@
*/
#ifndef LZMA_H_INTERNAL
-# error Never include this file directly. Use instead.
+#error Never include this file directly. Use instead.
#endif
-
/**
* \brief Maximum supported value of a variable-length integer
*/
@@ -48,7 +47,6 @@
*/
#define LZMA_VLI_C(n) UINT64_C(n)
-
/**
* \brief Variable-length integer type
*
@@ -62,7 +60,6 @@
*/
typedef uint64_t lzma_vli;
-
/**
* \brief Validate a variable-length integer
*
@@ -72,9 +69,8 @@ typedef uint64_t lzma_vli;
* \return True if the integer is representable as VLI or if it
* indicates unknown value.
*/
-#define lzma_vli_is_valid(vli) \
- ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
-
+#define lzma_vli_is_valid(vli) \
+ ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
/**
* \brief Encode a variable-length integer
@@ -112,9 +108,9 @@ typedef uint64_t lzma_vli;
* - LZMA_BUF_ERROR: No output space was provided.
* - LZMA_PROG_ERROR: Arguments are not sane.
*/
-extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
- uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_vli_encode(lzma_vli vli, size_t *vli_pos, uint8_t *out,
+ size_t *out_pos, size_t out_size) lzma_nothrow;
/**
* \brief Decode a variable-length integer
@@ -151,10 +147,9 @@ extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
* - LZMA_BUF_ERROR: No input was provided.
* - LZMA_PROG_ERROR: Arguments are not sane.
*/
-extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos,
- const uint8_t *in, size_t *in_pos, size_t in_size)
- lzma_nothrow;
-
+extern LZMA_API(lzma_ret)
+ lzma_vli_decode(lzma_vli *vli, size_t *vli_pos, const uint8_t *in,
+ size_t *in_pos, size_t in_size) lzma_nothrow;
/**
* \brief Get the number of bytes required to encode a VLI
@@ -162,5 +157,5 @@ extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos,
* \return Number of bytes on success (1-9). If vli isn't valid,
* zero is returned.
*/
-extern LZMA_API(uint32_t) lzma_vli_size(lzma_vli vli)
- lzma_nothrow lzma_attr_pure;
+extern LZMA_API(uint32_t)
+ lzma_vli_size(lzma_vli vli) lzma_nothrow lzma_attr_pure;
diff --git a/node_modules/lzma-native/src/filter-array.cpp b/node_modules/lzma-native/src/filter-array.cpp
index 4e2219d..7034899 100644
--- a/node_modules/lzma-native/src/filter-array.cpp
+++ b/node_modules/lzma-native/src/filter-array.cpp
@@ -4,59 +4,65 @@ namespace lzma {
FilterArray::FilterArray(Local arr) : ok_(false) {
Nan::HandleScope();
-
+
if (!arr->IsArray() || arr.IsEmpty()) {
Nan::ThrowTypeError("Filter array expected");
return;
}
-
+
size_t len = arr->Length();
-
+
Local id_ = NewString("id");
Local options_ = NewString("options");
-
+
for (size_t i = 0; i < len; ++i) {
- Local