Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

CRC Function

#include <boost/cstdint.hpp>  // for boost::uintmax_t
#include <boost/integer.hpp>  // for boost::uint_t
#include <cstddef>            // for std::size_t

namespace boost
{
    template < std::size_t Bits, uintmax_t TruncPoly, uintmax_t InitRem,
     uintmax_t FinalXor, bool ReflectIn, bool ReflectRem >
    typename uint_t<Bits>::fast  crc( void const *buffer, std::size_t
     byte_count );
}

The boost::crc function template computes the unaugmented CRC of a single data block in one pass. It has the same template parameter list as boost::crc_optimal, which it uses for implementation. This function saves you the trouble of setting up and using the boost::crc_optimal object manually.


PrevUpHomeNext