Lines Matching refs:size
10 SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType) in SeqInStream_Read2() argument
12 while (size != 0) in SeqInStream_Read2()
14 size_t processed = size; in SeqInStream_Read2()
19 size -= processed; in SeqInStream_Read2()
24 SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size) in SeqInStream_Read() argument
26 return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); in SeqInStream_Read()
42 SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size) in LookInStream_LookRead() argument
45 if (*size == 0) in LookInStream_LookRead()
47 RINOK(stream->Look(stream, &lookBuf, size)); in LookInStream_LookRead()
48 memcpy(buf, lookBuf, *size); in LookInStream_LookRead()
49 return stream->Skip(stream, *size); in LookInStream_LookRead()
52 SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType) in LookInStream_Read2() argument
54 while (size != 0) in LookInStream_Read2()
56 size_t processed = size; in LookInStream_Read2()
61 size -= processed; in LookInStream_Read2()
66 SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size) in LookInStream_Read() argument
68 return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); in LookInStream_Read()
71 static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size) in LookToRead_Look_Lookahead() argument
75 size_t size2 = p->size - p->pos; in LookToRead_Look_Lookahead()
76 if (size2 == 0 && *size > 0) in LookToRead_Look_Lookahead()
81 p->size = size2; in LookToRead_Look_Lookahead()
83 if (size2 < *size) in LookToRead_Look_Lookahead()
84 *size = size2; in LookToRead_Look_Lookahead()
89 static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size) in LookToRead_Look_Exact() argument
93 size_t size2 = p->size - p->pos; in LookToRead_Look_Exact()
94 if (size2 == 0 && *size > 0) in LookToRead_Look_Exact()
97 if (*size > LookToRead_BUF_SIZE) in LookToRead_Look_Exact()
98 *size = LookToRead_BUF_SIZE; in LookToRead_Look_Exact()
99 res = p->realStream->Read(p->realStream, p->buf, size); in LookToRead_Look_Exact()
100 size2 = p->size = *size; in LookToRead_Look_Exact()
102 if (size2 < *size) in LookToRead_Look_Exact()
103 *size = size2; in LookToRead_Look_Exact()
115 static SRes LookToRead_Read(void *pp, void *buf, size_t *size) in LookToRead_Read() argument
118 size_t rem = p->size - p->pos; in LookToRead_Read()
120 return p->realStream->Read(p->realStream, buf, size); in LookToRead_Read()
121 if (rem > *size) in LookToRead_Read()
122 rem = *size; in LookToRead_Read()
125 *size = rem; in LookToRead_Read()
132 p->pos = p->size = 0; in LookToRead_Seek()
148 p->pos = p->size = 0; in LookToRead_Init()
151 static SRes SecToLook_Read(void *pp, void *buf, size_t *size) in SecToLook_Read() argument
154 return LookInStream_LookRead(p->realStream, buf, size); in SecToLook_Read()
162 static SRes SecToRead_Read(void *pp, void *buf, size_t *size) in SecToRead_Read() argument
165 return p->realStream->Read(p->realStream, buf, size); in SecToRead_Read()