VirtualBox

Changeset 21914 in vbox


Ignore:
Timestamp:
Jul 31, 2009 12:09:58 PM (15 years ago)
Author:
vboxsync
Message:

iprt: combined crc32.h and crc64.h into crc.h. Added Adler-32.

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crc32.h

    r20374 r21914  
    11/** @file
    2  * IPRT - CRC32.
     2 * IPRT - CRC-32.
    33 */
    44
     
    2828 */
    2929
    30 #ifndef ___iprt_crc32_h
    31 #define ___iprt_crc32_h
     30/* Forwarding to the canonical header. */
     31#include <iprt/crc.h>
    3232
    33 #include <iprt/cdefs.h>
    34 #include <iprt/types.h>
    35 
    36 
    37 RT_C_DECLS_BEGIN
    38 
    39 /** @defgroup grp_rt_crc32      RTCrc32 - CRC32 Calculation
    40  * @ingroup grp_rt
    41  * @{
    42  */
    43 
    44 /**
    45  * Calculate CRC32 for a memory block.
    46  *
    47  * @returns CRC32 for the memory block.
    48  * @param   pv      Pointer to the memory block.
    49  * @param   cb      Size of the memory block in bytes.
    50  */
    51 RTDECL(uint32_t) RTCrc32(const void *pv, size_t cb);
    52 
    53 /**
    54  * Start a multiblock CRC32 calculation.
    55  *
    56  * @returns Start CRC32.
    57  */
    58 RTDECL(uint32_t) RTCrc32Start(void);
    59 
    60 /**
    61  * Processes a multiblock of a CRC32 calculation.
    62  *
    63  * @returns Intermediate CRC32 value.
    64  * @param   uCRC32  Current CRC32 intermediate value.
    65  * @param   pv      The data block to process.
    66  * @param   cb      The size of the data block in bytes.
    67  */
    68 RTDECL(uint32_t) RTCrc32Process(uint32_t uCRC32, const void *pv, size_t cb);
    69 
    70 /**
    71  * Complete a multiblock CRC32 calculation.
    72  *
    73  * @returns CRC32 value.
    74  * @param   uCRC32  Current CRC32 intermediate value.
    75  */
    76 RTDECL(uint32_t) RTCrc32Finish(uint32_t uCRC32);
    77 
    78 
    79 
    80 /** @} */
    81 
    82 RT_C_DECLS_END
    83 
    84 #endif
    85 
  • trunk/include/iprt/crc64.h

    r20374 r21914  
    2828 */
    2929
    30 #ifndef ___iprt_crc64_h
    31 #define ___iprt_crc64_h
     30/* Forwarding to the canonical header. */
     31#include <iprt/crc.h>
    3232
    33 
    34 #include <iprt/cdefs.h>
    35 #include <iprt/types.h>
    36 
    37 
    38 RT_C_DECLS_BEGIN
    39 
    40 /** @defgroup grp_rt_crc64      RTCrc64 - CRC64 Calculation
    41  * @ingroup grp_rt
    42  * @{
    43  */
    44 
    45 /**
    46  * Calculate CRC64 for a memory block.
    47  *
    48  * @returns CRC64 for the memory block.
    49  * @param   pv      Pointer to the memory block.
    50  * @param   cb      Size of the memory block in bytes.
    51  */
    52 RTDECL(uint64_t) RTCrc64(const void *pv, size_t cb);
    53 
    54 /**
    55  * Start a multiblock CRC64 calculation.
    56  *
    57  * @returns Start CRC64.
    58  */
    59 RTDECL(uint64_t) RTCrc64Start(void);
    60 
    61 /**
    62  * Processes a multiblock of a CRC64 calculation.
    63  *
    64  * @returns Intermediate CRC64 value.
    65  * @param   uCRC64  Current CRC64 intermediate value.
    66  * @param   pv      The data block to process.
    67  * @param   cb      The size of the data block in bytes.
    68  */
    69 RTDECL(uint64_t) RTCrc64Process(uint64_t uCRC64, const void *pv, size_t cb);
    70 
    71 /**
    72  * Complete a multiblock CRC64 calculation.
    73  *
    74  * @returns CRC64 value.
    75  * @param   uCRC64  Current CRC64 intermediate value.
    76  */
    77 RTDECL(uint64_t) RTCrc64Finish(uint64_t uCRC64);
    78 
    79 
    80 
    81 /** @} */
    82 
    83 RT_C_DECLS_END
    84 
    85 #endif
    86 
    87 
  • trunk/src/VBox/Runtime/Makefile.kmk

    r21844 r21914  
    201201        common/alloc/alloc.cpp \
    202202        common/alloc/heapsimple.cpp \
     203        common/checksum/adler32.cpp \
    203204        common/checksum/crc32.cpp \
    204205        common/checksum/crc64.cpp \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette