File indexing completed on 2024-04-06 12:14:06
0001 #ifndef _include_LzmaFile_h_
0002 #define _include_LzmaFile_h_
0003
0004 #include "Types.h"
0005 #include "7zFile.h"
0006 #include "LzmaDec.h"
0007
0008 #include <string>
0009 #include <queue>
0010
0011 #include "LzmaDec.h"
0012 #include "Alloc.h"
0013 #include "Types.h"
0014 #include "7zFile.h"
0015
0016 #include <sstream>
0017 #include <string>
0018 #include <iostream>
0019 #include <queue>
0020
0021 #define IN_BUF_SIZE (1 << 16)
0022 #define OUT_BUF_SIZE (1 << 16)
0023
0024 struct LzmaFile {
0025 LzmaFile();
0026
0027 SRes Open(const std::string& fileName);
0028 SRes Close();
0029 SRes DecodeAll();
0030 SRes DecodeBuffer();
0031
0032 SRes ReadNextNumber(double& data);
0033 SRes FillArray(double* data, const int length);
0034
0035 CFileSeqInStream inStream;
0036 int res;
0037 CLzmaDec state;
0038
0039
0040
0041 UInt64 unpackSize;
0042
0043 Byte inBuf[IN_BUF_SIZE];
0044 Byte outBuf[OUT_BUF_SIZE];
0045
0046 std::queue<double> fStorage;
0047
0048 size_t inPos;
0049 size_t inSize;
0050 size_t outPos;
0051
0052
0053 bool fStartNumber;
0054
0055 bool fReadSign;
0056 bool fReadMantisseR;
0057 bool fReadMantisseF;
0058 bool fReadExponentSign;
0059 bool fReadExponent;
0060
0061 bool fNegative;
0062 bool fExponentNegative;
0063
0064 double fMantisseR;
0065 double fMantisseF;
0066 int fMantisseFcount;
0067 int fExponent;
0068 };
0069
0070 #endif