Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/lzma/v4_65/files/Java/SevenZip/Compression/LZ/OutWindow.java

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/lzma/v4_65/files/Java/SevenZip/Compression/LZ/OutWindow.java
diff --git a/third_party/lzma/v4_65/files/Java/SevenZip/Compression/LZ/OutWindow.java b/third_party/lzma/v4_65/files/Java/SevenZip/Compression/LZ/OutWindow.java
deleted file mode 100644
index 2fd283214e3c36223d9da6f15b84f9e991e3e8e2..0000000000000000000000000000000000000000
--- a/third_party/lzma/v4_65/files/Java/SevenZip/Compression/LZ/OutWindow.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// LZ.OutWindow
-
-package SevenZip.Compression.LZ;
-
-import java.io.IOException;
-
-public class OutWindow
-{
- byte[] _buffer;
- int _pos;
- int _windowSize = 0;
- int _streamPos;
- java.io.OutputStream _stream;
-
- public void Create(int windowSize)
- {
- if (_buffer == null || _windowSize != windowSize)
- _buffer = new byte[windowSize];
- _windowSize = windowSize;
- _pos = 0;
- _streamPos = 0;
- }
-
- public void SetStream(java.io.OutputStream stream) throws IOException
- {
- ReleaseStream();
- _stream = stream;
- }
-
- public void ReleaseStream() throws IOException
- {
- Flush();
- _stream = null;
- }
-
- public void Init(boolean solid)
- {
- if (!solid)
- {
- _streamPos = 0;
- _pos = 0;
- }
- }
-
- public void Flush() throws IOException
- {
- int size = _pos - _streamPos;
- if (size == 0)
- return;
- _stream.write(_buffer, _streamPos, size);
- if (_pos >= _windowSize)
- _pos = 0;
- _streamPos = _pos;
- }
-
- public void CopyBlock(int distance, int len) throws IOException
- {
- int pos = _pos - distance - 1;
- if (pos < 0)
- pos += _windowSize;
- for (; len != 0; len--)
- {
- if (pos >= _windowSize)
- pos = 0;
- _buffer[_pos++] = _buffer[pos++];
- if (_pos >= _windowSize)
- Flush();
- }
- }
-
- public void PutByte(byte b) throws IOException
- {
- _buffer[_pos++] = b;
- if (_pos >= _windowSize)
- Flush();
- }
-
- public byte GetByte(int distance)
- {
- int pos = _pos - distance - 1;
- if (pos < 0)
- pos += _windowSize;
- return _buffer[pos];
- }
-}

Powered by Google App Engine
This is Rietveld 408576698