Algorithm-GDiffDelta

 view release on metacpan or  search on metacpan

util.h  view on Meta::CPAN

#define QEF_UBYTE_MAX 0xFFUL

/* Maximum value of a GDIFF ushort (unsigned 16 bit value).  */
#define QEF_USHORT_MAX 0xFFFFUL

/* Maximum value of a GDIFF int (signed 32 bit value).  */
#define QEF_INT_MAX 0x7FFFFFFFUL

/* Copy a number into a buffer in big-endian format, using a counter as an
 * index into the buffer and moving it along the right number of bytes.  */
#define QEF_BE16_PUT(buf, idx, num) \
    do { \
        buf[idx++] = ((num) >> 8) & 0xFF; \
        buf[idx++] = (num) & 0xFF; \
    } while (0)
#define QEF_BE32_PUT(buf, idx, num) \
    do { \
        buf[idx++] = ((num) >> 24) & 0xFF; \
        buf[idx++] = ((num) >> 16) & 0xFF; \
        buf[idx++] = ((num) >> 8) & 0xFF; \
        buf[idx++] = (num) & 0xFF; \
    } while (0)


/* Data structures for the hashes of the original file.  */
struct QefChaNode {
    struct QefChaNode *next;
    long icurr;
};
typedef struct QefChaNode QefChaNode;

struct QefChaStore {
    QefChaNode *head, *tail;
    long isize, nsize;
    QefChaNode *ancur;
    QefChaNode *sncur;
    long scurr;
};
typedef struct QefChaStore QefChaStore;

struct QefBDRecord
{
    struct QefBDRecord *next;
    U32 fp;
    Off_t offset;
};
typedef struct QefBDRecord QefBDRecord;

struct QefBDFile
{
    Off_t size;
    QefChaStore cha;
    unsigned int fphbits;
    QefBDRecord **fphash;
};
typedef struct QefBDFile QefBDFile;


#endif  /* QEFGDIFF_INCLUDE_UTIL_H_ */

/* vi:set ts=4 sw=4 expandtab: */



( run in 0.826 second using v1.01-cache-2.11-cpan-5b529ec07f3 )