summaryrefslogtreecommitdiffstats
path: root/other-licenses/7zstub/src/7zip/Common/LimitedStreams.h
diff options
context:
space:
mode:
Diffstat (limited to 'other-licenses/7zstub/src/7zip/Common/LimitedStreams.h')
-rw-r--r--other-licenses/7zstub/src/7zip/Common/LimitedStreams.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/other-licenses/7zstub/src/7zip/Common/LimitedStreams.h b/other-licenses/7zstub/src/7zip/Common/LimitedStreams.h
new file mode 100644
index 000000000..7658b620d
--- /dev/null
+++ b/other-licenses/7zstub/src/7zip/Common/LimitedStreams.h
@@ -0,0 +1,23 @@
+// LimitedStreams.h
+
+#ifndef __LIMITEDSTREAMS_H
+#define __LIMITEDSTREAMS_H
+
+#include "../../Common/MyCom.h"
+#include "../IStream.h"
+
+class CLimitedSequentialInStream:
+ public ISequentialInStream,
+ public CMyUnknownImp
+{
+ UInt64 _size;
+ CMyComPtr<ISequentialInStream> _stream;
+public:
+ void Init(ISequentialInStream *stream, UInt64 streamSize);
+
+ MY_UNKNOWN_IMP
+
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
+};
+
+#endif