]> mj.ucw.cz Git - libucw.git/blobdiff - lib/buck2obj.h
added buck2obj_realloc(), it is automatically called when needed
[libucw.git] / lib / buck2obj.h
index 9e272079f8f26df14fcc68aa2cb6da1de0f3215b..0a7d0c05bca253c972bf9a23781f8fbcd0264593 100644 (file)
@@ -4,4 +4,13 @@
  *     (c) 2004, Robert Spalek <robert@ucw.cz>
  */
 
-int extract_odes(struct obuck_header *hdr, struct fastbuf *body, struct odes *o, byte *buf, uns buf_len, struct lizard_buffer *lizard_buf);
+struct buck2obj_buf;
+
+struct buck2obj_buf *buck2obj_alloc(uns max_len, struct mempool *mp);
+void buck2obj_free(struct buck2obj_buf *buf);
+void buck2obj_realloc(struct buck2obj_buf *buf, uns max_len);
+struct odes *buck2obj_convert(struct buck2obj_buf *buf, uns buck_type, struct fastbuf *body);
+  /* If BCONFIG_CAN_OVERWRITE(body)==2, then the buffer of body has probably
+   * been tampered (unless the bucket is larger than the buffer).  In such a
+   * case, you must call bflush(body) before you do anything else than
+   * sequential read.  */