Go to the source code of this file.
Functions | |
SRes | LookInStream_LookRead (ILookInStream *stream, void *buf, size_t *size) |
SRes | LookInStream_Read (ILookInStream *stream, void *buf, size_t size) |
SRes | LookInStream_Read2 (ILookInStream *stream, void *buf, size_t size, SRes errorType) |
SRes | LookInStream_SeekTo (ILookInStream *stream, UInt64 offset) |
void | LookToRead_CreateVTable (CLookToRead *p, int lookahead) |
void | LookToRead_Init (CLookToRead *p) |
static SRes | LookToRead_Look_Exact (void *pp, const void **buf, size_t *size) |
static SRes | LookToRead_Look_Lookahead (void *pp, const void **buf, size_t *size) |
static SRes | LookToRead_Read (void *pp, void *buf, size_t *size) |
static SRes | LookToRead_Seek (void *pp, Int64 *pos, ESzSeek origin) |
static SRes | LookToRead_Skip (void *pp, size_t offset) |
void | SecToLook_CreateVTable (CSecToLook *p) |
static SRes | SecToLook_Read (void *pp, void *buf, size_t *size) |
void | SecToRead_CreateVTable (CSecToRead *p) |
static SRes | SecToRead_Read (void *pp, void *buf, size_t *size) |
SRes | SeqInStream_Read (ISeqInStream *stream, void *buf, size_t size) |
SRes | SeqInStream_Read2 (ISeqInStream *stream, void *buf, size_t size, SRes errorType) |
SRes | SeqInStream_ReadByte (ISeqInStream *stream, Byte *buf) |
SRes LookInStream_LookRead | ( | ILookInStream * | stream, |
void * | buf, | ||
size_t * | size | ||
) |
Definition at line 40 of file 7zStream.cc.
References ILookInStream::Look, RINOK, ILookInStream::Skip, and SZ_OK.
Referenced by SecToLook_Read().
SRes LookInStream_Read | ( | ILookInStream * | stream, |
void * | buf, | ||
size_t | size | ||
) |
Definition at line 64 of file 7zStream.cc.
References LookInStream_Read2(), and SZ_ERROR_INPUT_EOF.
{ return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); }
SRes LookInStream_Read2 | ( | ILookInStream * | stream, |
void * | buf, | ||
size_t | size, | ||
SRes | errorType | ||
) |
Definition at line 50 of file 7zStream.cc.
References ILookInStream::Read, RINOK, findQualityFiles::size, and SZ_OK.
Referenced by LookInStream_Read().
SRes LookInStream_SeekTo | ( | ILookInStream * | stream, |
UInt64 | offset | ||
) |
Definition at line 34 of file 7zStream.cc.
References evf::evtn::offset(), ILookInStream::Seek, SZ_SEEK_SET, and lumiQTWidget::t.
{ Int64 t = offset; return stream->Seek(stream, &t, SZ_SEEK_SET); }
void LookToRead_CreateVTable | ( | CLookToRead * | p, |
int | lookahead | ||
) |
Definition at line 134 of file 7zStream.cc.
References ILookInStream::Look, LookToRead_Look_Exact(), LookToRead_Look_Lookahead(), LookToRead_Read(), LookToRead_Seek(), LookToRead_Skip(), ILookInStream::Read, CLookToRead::s, ILookInStream::Seek, and ILookInStream::Skip.
{ p->s.Look = lookahead ? LookToRead_Look_Lookahead : LookToRead_Look_Exact; p->s.Skip = LookToRead_Skip; p->s.Read = LookToRead_Read; p->s.Seek = LookToRead_Seek; }
void LookToRead_Init | ( | CLookToRead * | p | ) |
Definition at line 144 of file 7zStream.cc.
References CLookToRead::pos, and CLookToRead::size.
static SRes LookToRead_Look_Exact | ( | void * | pp, |
const void ** | buf, | ||
size_t * | size | ||
) | [static] |
Definition at line 87 of file 7zStream.cc.
References CLookToRead::buf, LookToRead_BUF_SIZE, AlCaHLTBitMon_ParallelJobs::p, CLookToRead::pos, ISeekInStream::Read, CLookToRead::realStream, CLookToRead::size, findQualityFiles::size, and SZ_OK.
Referenced by LookToRead_CreateVTable().
{ SRes res = SZ_OK; CLookToRead *p = (CLookToRead *)pp; size_t size2 = p->size - p->pos; if (size2 == 0 && *size > 0) { p->pos = 0; if (*size > LookToRead_BUF_SIZE) *size = LookToRead_BUF_SIZE; res = p->realStream->Read(p->realStream, p->buf, size); size2 = p->size = *size; } if (size2 < *size) *size = size2; *buf = p->buf + p->pos; return res; }
static SRes LookToRead_Look_Lookahead | ( | void * | pp, |
const void ** | buf, | ||
size_t * | size | ||
) | [static] |
Definition at line 69 of file 7zStream.cc.
References CLookToRead::buf, LookToRead_BUF_SIZE, AlCaHLTBitMon_ParallelJobs::p, CLookToRead::pos, ISeekInStream::Read, CLookToRead::realStream, CLookToRead::size, and SZ_OK.
Referenced by LookToRead_CreateVTable().
{ SRes res = SZ_OK; CLookToRead *p = (CLookToRead *)pp; size_t size2 = p->size - p->pos; if (size2 == 0 && *size > 0) { p->pos = 0; size2 = LookToRead_BUF_SIZE; res = p->realStream->Read(p->realStream, p->buf, &size2); p->size = size2; } if (size2 < *size) *size = size2; *buf = p->buf + p->pos; return res; }
static SRes LookToRead_Read | ( | void * | pp, |
void * | buf, | ||
size_t * | size | ||
) | [static] |
Definition at line 113 of file 7zStream.cc.
References CLookToRead::buf, AlCaHLTBitMon_ParallelJobs::p, CLookToRead::pos, ISeekInStream::Read, CLookToRead::realStream, CLookToRead::size, findQualityFiles::size, and SZ_OK.
Referenced by LookToRead_CreateVTable().
{ CLookToRead *p = (CLookToRead *)pp; size_t rem = p->size - p->pos; if (rem == 0) return p->realStream->Read(p->realStream, buf, size); if (rem > *size) rem = *size; memcpy(buf, p->buf + p->pos, rem); p->pos += rem; *size = rem; return SZ_OK; }
Definition at line 127 of file 7zStream.cc.
References AlCaHLTBitMon_ParallelJobs::p, CLookToRead::pos, CLookToRead::realStream, ISeekInStream::Seek, and CLookToRead::size.
Referenced by LookToRead_CreateVTable().
{ CLookToRead *p = (CLookToRead *)pp; p->pos = p->size = 0; return p->realStream->Seek(p->realStream, pos, origin); }
static SRes LookToRead_Skip | ( | void * | pp, |
size_t | offset | ||
) | [static] |
Definition at line 106 of file 7zStream.cc.
References evf::evtn::offset(), AlCaHLTBitMon_ParallelJobs::p, CLookToRead::pos, and SZ_OK.
Referenced by LookToRead_CreateVTable().
{ CLookToRead *p = (CLookToRead *)pp; p->pos += offset; return SZ_OK; }
void SecToLook_CreateVTable | ( | CSecToLook * | p | ) |
Definition at line 155 of file 7zStream.cc.
References ISeqInStream::Read, CSecToLook::s, and SecToLook_Read().
{ p->s.Read = SecToLook_Read; }
static SRes SecToLook_Read | ( | void * | pp, |
void * | buf, | ||
size_t * | size | ||
) | [static] |
Definition at line 149 of file 7zStream.cc.
References LookInStream_LookRead(), AlCaHLTBitMon_ParallelJobs::p, and CSecToLook::realStream.
Referenced by SecToLook_CreateVTable().
{ CSecToLook *p = (CSecToLook *)pp; return LookInStream_LookRead(p->realStream, buf, size); }
void SecToRead_CreateVTable | ( | CSecToRead * | p | ) |
Definition at line 166 of file 7zStream.cc.
References ISeqInStream::Read, CSecToRead::s, and SecToRead_Read().
{ p->s.Read = SecToRead_Read; }
static SRes SecToRead_Read | ( | void * | pp, |
void * | buf, | ||
size_t * | size | ||
) | [static] |
Definition at line 160 of file 7zStream.cc.
References AlCaHLTBitMon_ParallelJobs::p, ILookInStream::Read, and CSecToRead::realStream.
Referenced by SecToRead_CreateVTable().
{ CSecToRead *p = (CSecToRead *)pp; return p->realStream->Read(p->realStream, buf, size); }
SRes SeqInStream_Read | ( | ISeqInStream * | stream, |
void * | buf, | ||
size_t | size | ||
) |
Definition at line 22 of file 7zStream.cc.
References SeqInStream_Read2(), and SZ_ERROR_INPUT_EOF.
Referenced by LzmaFile::Open().
{ return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); }
SRes SeqInStream_Read2 | ( | ISeqInStream * | stream, |
void * | buf, | ||
size_t | size, | ||
SRes | errorType | ||
) |
Definition at line 8 of file 7zStream.cc.
References ISeqInStream::Read, RINOK, findQualityFiles::size, and SZ_OK.
Referenced by SeqInStream_Read().
SRes SeqInStream_ReadByte | ( | ISeqInStream * | stream, |
Byte * | buf | ||
) |
Definition at line 27 of file 7zStream.cc.
References ISeqInStream::Read, RINOK, SZ_ERROR_INPUT_EOF, and SZ_OK.
{ size_t processed = 1; RINOK(stream->Read(stream, buf, &processed)); return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; }