Exemplo n.º 1
0
// A CRC-32 computer based on crc_basic, for timing
boost::uint32_t
basic_crc32
(
    void const *  buffer,
    std::size_t   byte_count
)
{
    static  boost::crc_basic<32>  computer( 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF,
     true, true );

    computer.reset();
    computer.process_bytes( buffer, byte_count );
    return computer.checksum();
}
Exemplo n.º 2
0
 void process_bytes(const void* buffer, size_t byte_count)
 {
     crc_.process_bytes(buffer, byte_count);
 }