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

Unified Diff: third_party/lzma/v4_65/files/CPP/7zip/Archive/Lzma/LzmaIn.cpp

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/CPP/7zip/Archive/Lzma/LzmaIn.cpp
diff --git a/third_party/lzma/v4_65/files/CPP/7zip/Archive/Lzma/LzmaIn.cpp b/third_party/lzma/v4_65/files/CPP/7zip/Archive/Lzma/LzmaIn.cpp
deleted file mode 100644
index 342b01e1359651cee0f5f6fa6429a5e42178c39c..0000000000000000000000000000000000000000
--- a/third_party/lzma/v4_65/files/CPP/7zip/Archive/Lzma/LzmaIn.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// Archive/LzmaIn.cpp
-
-#include "StdAfx.h"
-
-#include "LzmaIn.h"
-
-#include "../../Common/StreamUtils.h"
-
-namespace NArchive {
-namespace NLzma {
-
-static bool CheckDictSize(const Byte *p)
-{
- UInt32 dicSize = GetUi32(p);
- int i;
- for (i = 1; i <= 30; i++)
- if (dicSize == ((UInt32)2 << i) || dicSize == ((UInt32)3 << i))
- return true;
- return false;
-}
-
-HRESULT ReadStreamHeader(ISequentialInStream *inStream, CHeader &block)
-{
- Byte sig[5 + 9];
- RINOK(ReadStream_FALSE(inStream, sig, 5 + 8));
-
- const Byte kMaxProp0Val = 5 * 5 * 9 - 1;
- if (sig[0] > kMaxProp0Val)
- return S_FALSE;
-
- for (int i = 0; i < 5; i++)
- block.LzmaProps[i] = sig[i];
-
- block.IsThereFilter = false;
- block.FilterMethod = 0;
-
- if (!CheckDictSize(sig + 1))
- {
- if (sig[0] > 1 || sig[1] > kMaxProp0Val)
- return S_FALSE;
- block.IsThereFilter = true;
- block.FilterMethod = sig[0];
- for (int i = 0; i < 5; i++)
- block.LzmaProps[i] = sig[i + 1];
- if (!CheckDictSize(block.LzmaProps + 1))
- return S_FALSE;
- RINOK(ReadStream_FALSE(inStream, sig + 5 + 8, 1));
- }
- UInt32 unpOffset = 5 + (block.IsThereFilter ? 1 : 0);
- block.UnpackSize = GetUi64(sig + unpOffset);
- if (block.HasUnpackSize() && block.UnpackSize >= ((UInt64)1 << 56))
- return S_FALSE;
- return S_OK;
-}
-
-}}

Powered by Google App Engine
This is Rietveld 408576698