summaryrefslogtreecommitdiffstats
path: root/modules/libjar/nsJARInputStream.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-11-13 16:00:06 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-13 16:00:06 +0000
commit2d8013526a65097dd9610a617e10b0c92a639ff5 (patch)
tree13493814aa388e327fde6e5db34bdb529dd89ef1 /modules/libjar/nsJARInputStream.h
parentd86f49ba59b2740e1e375016393c4994ec1e236e (diff)
downloadUXP-2d8013526a65097dd9610a617e10b0c92a639ff5.tar
UXP-2d8013526a65097dd9610a617e10b0c92a639ff5.tar.gz
UXP-2d8013526a65097dd9610a617e10b0c92a639ff5.tar.lz
UXP-2d8013526a65097dd9610a617e10b0c92a639ff5.tar.xz
UXP-2d8013526a65097dd9610a617e10b0c92a639ff5.zip
Issue #1683 - Update libjar module.
Diffstat (limited to 'modules/libjar/nsJARInputStream.h')
-rw-r--r--modules/libjar/nsJARInputStream.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/libjar/nsJARInputStream.h b/modules/libjar/nsJARInputStream.h
index 1c396aa10..60c3d763e 100644
--- a/modules/libjar/nsJARInputStream.h
+++ b/modules/libjar/nsJARInputStream.h
@@ -12,6 +12,8 @@
#include "nsTArray.h"
#include "mozilla/Attributes.h"
+struct BrotliDecoderStateStruct;
+
/*-------------------------------------------------------------------------
* Class nsJARInputStream declaration. This class defines the type of the
* object returned by calls to nsJAR::GetInputStream(filename) for the
@@ -20,9 +22,15 @@
class nsJARInputStream final : public nsIInputStream
{
public:
- nsJARInputStream() :
- mOutSize(0), mInCrc(0), mOutCrc(0), mNameLen(0),
- mCurPos(0), mArrPos(0), mMode(MODE_NOTINITED)
+ nsJARInputStream()
+ : mOutSize(0)
+ , mInCrc(0)
+ , mOutCrc(0)
+ , mBrotliState(nullptr)
+ , mNameLen(0)
+ , mCurPos(0)
+ , mArrPos(0)
+ , mMode(MODE_NOTINITED)
{
memset(&mZs, 0, sizeof(z_stream));
}
@@ -45,6 +53,7 @@ class nsJARInputStream final : public nsIInputStream
uint32_t mInCrc; // CRC as provided by the zipentry
uint32_t mOutCrc; // CRC as calculated by me
z_stream mZs; // zip data structure
+ BrotliDecoderStateStruct* mBrotliState; // Brotli decoder state
/* For directory reading */
RefPtr<nsJAR> mJar; // string reference to zipreader
@@ -59,6 +68,7 @@ class nsJARInputStream final : public nsIInputStream
MODE_CLOSED,
MODE_DIRECTORY,
MODE_INFLATE,
+ MODE_BROTLI,
MODE_COPY
} JISMode;