commit 823afafb42571046f38fbcb8597f229c777949d8 from: Omar Polo via: Thomas Adam date: Fri Jul 12 06:00:18 2024 UTC delete some dead code None of these structures are used anymore, the only thing still used are the GOT_PACK_OBJ_DELTA_OFF_* defines. commit - fd4b4abf78b705c9b4fe069a2490d5eb95476b4e commit + 823afafb42571046f38fbcb8597f229c777949d8 blob - 23cc0377a2c1355d3e9ff63ff6c557829f29f76c blob + 08acf40b3e797365f5cc41914e99e091f0f09fe7 --- lib/got_lib_pack.h +++ lib/got_lib_pack.h @@ -154,45 +154,9 @@ struct got_packfile_obj_hdr { #define GOT_PACK_OBJ_SIZE_VAL_MASK 0x7f }; -/* If object is not a DELTA type. */ -struct got_packfile_object_data { - uint8_t *data; /* compressed */ -}; - -/* If object is of type GOT_OBJ_TYPE_REF_DELTA. */ -struct got_packfile_object_data_ref_delta { - uint8_t sha1[SHA1_DIGEST_LENGTH]; - uint8_t *delta_data; /* compressed */ -}; - -/* If object is of type GOT_OBJ_TYPE_OFFSET_DELTA. */ -struct got_packfile_object_data_offset_delta { - /* - * This offset is interpreted as a negative offset from - * the got_packfile_obj_hdr corresponding to this object. - * The size provided in the header specifies the amount - * of compressed delta data that follows. - * - * This field uses a variable length encoding of N bytes, - * where the MSB is always set except for the last byte. - * The value is encoded as a series of N 7 bit integers, - * which are concatenated, and if N > 1 the value 2^7 + - * 2^14 + ... + 2^(7 * (n-1)) is added to the result. - */ - uint8_t *offset; /* variable length */ #define GOT_PACK_OBJ_DELTA_OFF_MORE 0x80 #define GOT_PACK_OBJ_DELTA_OFF_VAL_MASK 0x7f - uint8_t *delta_data; /* compressed */ -}; -struct got_packfile_obj_data { - union { - struct got_packfile_object_data data; - struct got_packfile_object_data_ref_delta ref_delta; - struct got_packfile_object_data_offset_delta offset_delta; - } __attribute__((__packed__)); -} __attribute__((__packed__)); - const struct got_error *got_packidx_init_hdr(struct got_packidx *, int, off_t); const struct got_error *got_packidx_open(struct got_packidx **, int, const char *, int);