aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-10-30 14:02:45 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-12 18:35:52 +0100
commit2e200cde9a58a64f3df5f1c69dcdd57ef9452c3d (patch)
tree919607fc52473fbb54d587c2c4102f58328f13f2 /util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp
parenta5b70676385d6b5da3d18f81042de4a1bb4cf0da (diff)
cbfstool: Update LZMA encoder to LZMA SDK 9.12
This removes almost all C++ code (except the wrapper) Change-Id: I0f84070e3b6dc57c98d49a53150a140479b3221f Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/1799 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp')
-rw-r--r--util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp b/util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp
deleted file mode 100644
index f5d2da5b55..0000000000
--- a/util/cbfstool/lzma/C/7zip/Common/StreamUtils.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// StreamUtils.cpp
-
-#include "StdAfx.h"
-
-#include "../../Common/MyCom.h"
-#include "StreamUtils.h"
-
-HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize)
-{
- if (processedSize != 0)
- *processedSize = 0;
- while(size != 0)
- {
- UInt32 processedSizeLoc;
- HRESULT res = stream->Read(data, size, &processedSizeLoc);
- if (processedSize != 0)
- *processedSize += processedSizeLoc;
- data = (Byte *)((Byte *)data + processedSizeLoc);
- size -= processedSizeLoc;
- RINOK(res);
- if (processedSizeLoc == 0)
- return S_OK;
- }
- return S_OK;
-}
-
-HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize)
-{
- if (processedSize != 0)
- *processedSize = 0;
- while(size != 0)
- {
- UInt32 processedSizeLoc;
- HRESULT res = stream->Write(data, size, &processedSizeLoc);
- if (processedSize != 0)
- *processedSize += processedSizeLoc;
- data = (const void *)((const Byte *)data + processedSizeLoc);
- size -= processedSizeLoc;
- RINOK(res);
- if (processedSizeLoc == 0)
- break;
- }
- return S_OK;
-}