~ubuntu-branches/ubuntu/lucid/unrar-nonfree/lucid

« back to all changes in this revision

Viewing changes to unpack.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Meredith
  • Date: 2009-06-06 17:46:05 UTC
  • mfrom: (1.1.11 upstream) (5.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090606174605-h4ciqxlpy39jmjx0
Tags: 1:3.9.3-1
* New upstream release
* Updated Copyright file (Closes: #531432)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    void UnpWriteBuf();
97
97
    void ExecuteCode(VM_PreparedProgram *Prg);
98
98
    void UnpWriteArea(unsigned int StartPtr,unsigned int EndPtr);
99
 
    void UnpWriteData(byte *Data,int Size);
 
99
    void UnpWriteData(byte *Data,size_t Size);
100
100
    bool ReadTables();
101
101
    void MakeDecodeTables(unsigned char *LenTab,struct Decode *Dec,int Size);
102
102
    int DecodeNumber(struct Decode *Dec);
141
141
 
142
142
    unsigned int UnpPtr,WrPtr;
143
143
    
144
 
    int ReadTop;
 
144
    // Top border of read packed data.
 
145
    int ReadTop; 
 
146
 
 
147
    // Border to call UnpReadBuf. We use it instead of (ReadTop-C)
 
148
    // for optimization reasons. Ensures that we have C bytes in buffer
 
149
    // unless we are at the end of file.
145
150
    int ReadBorder;
146
151
 
147
152
    unsigned char UnpOldTable[HUFF_TABLE_SIZE];
152
157
    bool ExternalWindow;
153
158
 
154
159
 
155
 
    Int64 DestUnpSize;
 
160
    int64 DestUnpSize;
156
161
 
157
162
    bool Suspended;
158
163
    bool UnpAllBuf;
159
164
    bool UnpSomeRead;
160
 
    Int64 WrittenFileSize;
 
165
    int64 WrittenFileSize;
161
166
    bool FileExtracted;
162
167
 
163
168
    int PrevLowDist,LowDistRepCount;
172
177
    void InitHuff();
173
178
    void CorrHuff(unsigned int *CharSet,unsigned int *NumToPlace);
174
179
    void OldCopyString(unsigned int Distance,unsigned int Length);
175
 
    unsigned int DecodeNum(int Num,unsigned int StartPos,
176
 
      unsigned int *DecTab,unsigned int *PosTab);
 
180
    uint DecodeNum(uint Num,uint StartPos,uint *DecTab,uint *PosTab);
177
181
    void OldUnpWriteBuf();
178
182
 
179
183
    unsigned int ChSet[256],ChSetA[256],ChSetB[256],ChSetC[256];
203
207
    void Init(byte *Window=NULL);
204
208
    void DoUnpack(int Method,bool Solid);
205
209
    bool IsFileExtracted() {return(FileExtracted);}
206
 
    void SetDestSize(Int64 DestSize) {DestUnpSize=DestSize;FileExtracted=false;}
 
210
    void SetDestSize(int64 DestSize) {DestUnpSize=DestSize;FileExtracted=false;}
207
211
    void SetSuspended(bool Suspended) {Unpack::Suspended=Suspended;}
208
212
 
209
213
    unsigned int GetChar()