chore: initial commit (extracted from Launchers monorepo)
Plugin: ns7zip v2.0.0 Architectures: x86-ansi, x86-unicode, amd64-unicode License: LGPL-2.1-or-later
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// StreamUtils.h
|
||||
|
||||
#ifndef ZIP7_INC_STREAM_UTILS_H
|
||||
#define ZIP7_INC_STREAM_UTILS_H
|
||||
|
||||
#include "../IStream.h"
|
||||
|
||||
inline HRESULT InStream_SeekSet(IInStream *stream, UInt64 offset) throw()
|
||||
{ return stream->Seek((Int64)offset, STREAM_SEEK_SET, NULL); }
|
||||
inline HRESULT InStream_GetPos(IInStream *stream, UInt64 &curPosRes) throw()
|
||||
{ return stream->Seek(0, STREAM_SEEK_CUR, &curPosRes); }
|
||||
inline HRESULT InStream_GetSize_SeekToEnd(IInStream *stream, UInt64 &sizeRes) throw()
|
||||
{ return stream->Seek(0, STREAM_SEEK_END, &sizeRes); }
|
||||
|
||||
HRESULT InStream_SeekToBegin(IInStream *stream) throw();
|
||||
HRESULT InStream_AtBegin_GetSize(IInStream *stream, UInt64 &size) throw();
|
||||
HRESULT InStream_GetPos_GetSize(IInStream *stream, UInt64 &curPosRes, UInt64 &sizeRes) throw();
|
||||
|
||||
inline HRESULT InStream_GetSize_SeekToBegin(IInStream *stream, UInt64 &sizeRes) throw()
|
||||
{
|
||||
RINOK(InStream_SeekToBegin(stream))
|
||||
return InStream_AtBegin_GetSize(stream, sizeRes);
|
||||
}
|
||||
|
||||
|
||||
HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *size) throw();
|
||||
HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size) throw();
|
||||
HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size) throw();
|
||||
HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size) throw();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user