diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-12 15:54:22 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-26 15:12:57 +0200 |
commit | 38d0278ffd22928cfcc66516a5f5a75f2480e702 (patch) | |
tree | 1ca80dadfab5ffb41eeb00808c715b53739f4786 /source/fitz/buffer.c | |
parent | ebba90e528308e2e5bfdc69b24ed9dd32d42121a (diff) | |
download | mupdf-38d0278ffd22928cfcc66516a5f5a75f2480e702.tar.xz |
Add 'mutool convert' and new document writer interface.
Only supports CBZ writing for now.
Also add a zip file writer.
Diffstat (limited to 'source/fitz/buffer.c')
-rw-r--r-- | source/fitz/buffer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/fitz/buffer.c b/source/fitz/buffer.c index 2d6f9932..4cff8715 100644 --- a/source/fitz/buffer.c +++ b/source/fitz/buffer.c @@ -197,6 +197,20 @@ void fz_write_buffer_rune(fz_context *ctx, fz_buffer *buf, int c) buf->unused_bits = 0; } +void fz_write_buffer_int32_le(fz_context *ctx, fz_buffer *buf, int x) +{ + fz_write_buffer_byte(ctx, buf, (x)&0xFF); + fz_write_buffer_byte(ctx, buf, (x>>8)&0xFF); + fz_write_buffer_byte(ctx, buf, (x>>16)&0xFF); + fz_write_buffer_byte(ctx, buf, (x>>24)&0xFF); +} + +void fz_write_buffer_int16_le(fz_context *ctx, fz_buffer *buf, int x) +{ + fz_write_buffer_byte(ctx, buf, (x)&0xFF); + fz_write_buffer_byte(ctx, buf, (x>>8)&0xFF); +} + void fz_write_buffer_bits(fz_context *ctx, fz_buffer *buf, int val, int bits) { int shift; |