Welcome to mirror list, hosted at ThFree Co, Russian Federation.

LZOutWindow.cpp « LZ « Compress « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 093c9ce8fcd18fb9dbe4989f8d5a669a39cac20a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// LZOutWindow.cpp

#include "StdAfx.h"

#include "../../../Common/Alloc.h"
#include "LZOutWindow.h"

void CLZOutWindow::Init(bool solid)
{
  if(!solid)
  {
    _streamPos = 0;
    _limitPos = _bufferSize;
    _pos = 0;
    _processedSize = 0;
    _overDict = false;
  }
  #ifdef _NO_EXCEPTIONS
  ErrorCode = S_OK;
  #endif
}

void CLZOutWindow::FlushWithCheck()
{
  HRESULT result = FlushPart();
  if (_pos == _bufferSize)
  {
    _pos = 0;
    _overDict = true;
  }
  #ifdef _NO_EXCEPTIONS
  ErrorCode = result;
  #else
  if (result != S_OK)
    throw CLZOutWindowException(result);
  #endif
}