summaryrefslogtreecommitdiff
path: root/ewah/ewah_io.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-06-14 23:32:28 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-06-18 10:16:19 -0700
commit26675087a58e1e7dd54bc0f059ad2f831c6e3fbf (patch)
treea8e15008cb6ffb8b2a4af38afb9ce4fc19f5883f /ewah/ewah_io.c
parentewah: drop ewah_deserialize function (diff)
downloadtgif-26675087a58e1e7dd54bc0f059ad2f831c6e3fbf.tar.xz
ewah: drop ewah_serialize_native function
We don't call this function, and never have. The on-disk bitmap format uses network-byte-order integers, meaning that we cannot use the native-byte-order format written here. Let's drop it in the name of simplicity. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ewah/ewah_io.c')
-rw-r--r--ewah/ewah_io.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c
index 5e8fa9ebfc..9035ee65ea 100644
--- a/ewah/ewah_io.c
+++ b/ewah/ewah_io.c
@@ -20,32 +20,6 @@
#include "ewok.h"
#include "strbuf.h"
-int ewah_serialize_native(struct ewah_bitmap *self, int fd)
-{
- uint32_t write32;
- size_t to_write = self->buffer_size * 8;
-
- /* 32 bit -- bit size for the map */
- write32 = (uint32_t)self->bit_size;
- if (write(fd, &write32, 4) != 4)
- return -1;
-
- /** 32 bit -- number of compressed 64-bit words */
- write32 = (uint32_t)self->buffer_size;
- if (write(fd, &write32, 4) != 4)
- return -1;
-
- if (write(fd, self->buffer, to_write) != to_write)
- return -1;
-
- /** 32 bit -- position for the RLW */
- write32 = self->rlw - self->buffer;
- if (write(fd, &write32, 4) != 4)
- return -1;
-
- return (3 * 4) + to_write;
-}
-
int ewah_serialize_to(struct ewah_bitmap *self,
int (*write_fun)(void *, const void *, size_t),
void *data)