Lines Matching refs:buffer
110 inline sal_uInt32 writeBYTE(sal_uInt8* buffer, sal_uInt8 v) in writeBYTE() argument
112 buffer[0] = v; in writeBYTE()
117 inline sal_uInt16 readBYTE(const sal_uInt8* buffer, sal_uInt8& v) in readBYTE() argument
119 v = buffer[0]; in readBYTE()
124 inline sal_uInt32 writeINT16(sal_uInt8* buffer, sal_Int16 v) in writeINT16() argument
126 buffer[0] = (sal_uInt8)((v >> 8) & 0xFF); in writeINT16()
127 buffer[1] = (sal_uInt8)((v >> 0) & 0xFF); in writeINT16()
132 inline sal_uInt32 readINT16(const sal_uInt8* buffer, sal_Int16& v) in readINT16() argument
134 v = ((buffer[0] << 8) | (buffer[1] << 0)); in readINT16()
139 inline sal_uInt32 writeUINT16(sal_uInt8* buffer, sal_uInt16 v) in writeUINT16() argument
141 buffer[0] = (sal_uInt8)((v >> 8) & 0xFF); in writeUINT16()
142 buffer[1] = (sal_uInt8)((v >> 0) & 0xFF); in writeUINT16()
147 inline sal_uInt32 readUINT16(const sal_uInt8* buffer, sal_uInt16& v) in readUINT16() argument
149 v = ((buffer[0] << 8) | (buffer[1] << 0)); in readUINT16()
154 inline sal_uInt32 writeINT32(sal_uInt8* buffer, sal_Int32 v) in writeINT32() argument
156 buffer[0] = (sal_uInt8)((v >> 24) & 0xFF); in writeINT32()
157 buffer[1] = (sal_uInt8)((v >> 16) & 0xFF); in writeINT32()
158 buffer[2] = (sal_uInt8)((v >> 8) & 0xFF); in writeINT32()
159 buffer[3] = (sal_uInt8)((v >> 0) & 0xFF); in writeINT32()
164 inline sal_uInt32 readINT32(const sal_uInt8* buffer, sal_Int32& v) in readINT32() argument
167 (buffer[0] << 24) | in readINT32()
168 (buffer[1] << 16) | in readINT32()
169 (buffer[2] << 8) | in readINT32()
170 (buffer[3] << 0) in readINT32()
176 inline sal_uInt32 writeUINT32(sal_uInt8* buffer, sal_uInt32 v) in writeUINT32() argument
178 buffer[0] = (sal_uInt8)((v >> 24) & 0xFF); in writeUINT32()
179 buffer[1] = (sal_uInt8)((v >> 16) & 0xFF); in writeUINT32()
180 buffer[2] = (sal_uInt8)((v >> 8) & 0xFF); in writeUINT32()
181 buffer[3] = (sal_uInt8)((v >> 0) & 0xFF); in writeUINT32()
186 inline sal_uInt32 readUINT32(const sal_uInt8* buffer, sal_uInt32& v) in readUINT32() argument
189 (buffer[0] << 24) | in readUINT32()
190 (buffer[1] << 16) | in readUINT32()
191 (buffer[2] << 8) | in readUINT32()
192 (buffer[3] << 0) in readUINT32()
198 inline sal_uInt32 writeINT64(sal_uInt8* buffer, sal_Int64 v) in writeINT64() argument
200 buffer[0] = (sal_uInt8)((v >> 56) & 0xFF); in writeINT64()
201 buffer[1] = (sal_uInt8)((v >> 48) & 0xFF); in writeINT64()
202 buffer[2] = (sal_uInt8)((v >> 40) & 0xFF); in writeINT64()
203 buffer[3] = (sal_uInt8)((v >> 32) & 0xFF); in writeINT64()
204 buffer[4] = (sal_uInt8)((v >> 24) & 0xFF); in writeINT64()
205 buffer[5] = (sal_uInt8)((v >> 16) & 0xFF); in writeINT64()
206 buffer[6] = (sal_uInt8)((v >> 8) & 0xFF); in writeINT64()
207 buffer[7] = (sal_uInt8)((v >> 0) & 0xFF); in writeINT64()
212 inline sal_uInt32 readINT64(const sal_uInt8* buffer, sal_Int64& v) in readINT64() argument
215 ((sal_Int64)buffer[0] << 56) | in readINT64()
216 ((sal_Int64)buffer[1] << 48) | in readINT64()
217 ((sal_Int64)buffer[2] << 40) | in readINT64()
218 ((sal_Int64)buffer[3] << 32) | in readINT64()
219 ((sal_Int64)buffer[4] << 24) | in readINT64()
220 ((sal_Int64)buffer[5] << 16) | in readINT64()
221 ((sal_Int64)buffer[6] << 8) | in readINT64()
222 ((sal_Int64)buffer[7] << 0) in readINT64()
228 inline sal_uInt32 writeUINT64(sal_uInt8* buffer, sal_uInt64 v) in writeUINT64() argument
230 buffer[0] = (sal_uInt8)((v >> 56) & 0xFF); in writeUINT64()
231 buffer[1] = (sal_uInt8)((v >> 48) & 0xFF); in writeUINT64()
232 buffer[2] = (sal_uInt8)((v >> 40) & 0xFF); in writeUINT64()
233 buffer[3] = (sal_uInt8)((v >> 32) & 0xFF); in writeUINT64()
234 buffer[4] = (sal_uInt8)((v >> 24) & 0xFF); in writeUINT64()
235 buffer[5] = (sal_uInt8)((v >> 16) & 0xFF); in writeUINT64()
236 buffer[6] = (sal_uInt8)((v >> 8) & 0xFF); in writeUINT64()
237 buffer[7] = (sal_uInt8)((v >> 0) & 0xFF); in writeUINT64()
242 inline sal_uInt32 readUINT64(const sal_uInt8* buffer, sal_uInt64& v) in readUINT64() argument
245 ((sal_uInt64)buffer[0] << 56) | in readUINT64()
246 ((sal_uInt64)buffer[1] << 48) | in readUINT64()
247 ((sal_uInt64)buffer[2] << 40) | in readUINT64()
248 ((sal_uInt64)buffer[3] << 32) | in readUINT64()
249 ((sal_uInt64)buffer[4] << 24) | in readUINT64()
250 ((sal_uInt64)buffer[5] << 16) | in readUINT64()
251 ((sal_uInt64)buffer[6] << 8) | in readUINT64()
252 ((sal_uInt64)buffer[7] << 0) in readUINT64()
258 inline sal_uInt32 writeUtf8(sal_uInt8* buffer, const sal_Char* v) in writeUtf8() argument
262 memcpy(buffer, v, size); in writeUtf8()
267 inline sal_uInt32 readUtf8(const sal_uInt8* buffer, sal_Char* v, sal_uInt32 maxSize) in readUtf8() argument
269 sal_uInt32 size = SAL_MIN(strlen((const sal_Char*) buffer) + 1, maxSize); in readUtf8()
271 memcpy(v, buffer, size); in readUtf8()
279 sal_uInt32 writeFloat(sal_uInt8* buffer, float v);
280 sal_uInt32 writeDouble(sal_uInt8* buffer, double v);
281 sal_uInt32 writeString(sal_uInt8* buffer, const sal_Unicode* v);
282 sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSize);