]> mj.ucw.cz Git - libucw.git/blob - lib/buck2obj.h
- obj_parse_dump() generalized to store apart the header and the body, and
[libucw.git] / lib / buck2obj.h
1 /*
2  *      Bucket -> Object converter
3  *
4  *      (c) 2004, Robert Spalek <robert@ucw.cz>
5  */
6
7 struct buck2obj_buf;
8 struct mempool;
9 struct odes;
10
11 struct buck2obj_buf *buck2obj_alloc(void);
12 void buck2obj_free(struct buck2obj_buf *buf);
13
14 int buck2obj_parse(struct buck2obj_buf *buf, uns buck_type, uns buck_len, struct fastbuf *body, struct odes *o_hdr, uns *body_start, struct odes *o_body);
15 struct odes *obj_read_bucket(struct buck2obj_buf *buf, struct mempool *pool, uns buck_type, uns buck_len, struct fastbuf *body, uns *body_start);
16   /* If body_start != NULL, then only the header is parsed and *body_start is
17    * set to the position of the body. This function does a plenty of optimizations
18    * and if the body fastbuf is overwritable (body->can_overwrite_buffer), it can keep the
19    * attribute values stored on their original locations in the fastbuf's buffer.
20    * However, no such things are performed when reading the header only.
21    */