Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
crc.hh
Package: dvd-munitions.tar.gz [view]
Upload User: aoeyumen
Upload Date: 2007-01-06
Package Size: 3329k
Code Size: 0k
Category:
DVD
Development Platform:
Unix_Linux
- /*
- File: crc.hh
- */
- #ifndef __crc_hh__
- #define __crc_hh__
- // 16-Bit CRC checksum class:
- class Crc16 {
- static const uint16 polynomial;
- uint16 crc;
- public:
- Crc16 (void){ crc = 0xFFFF; }
- void add_bits(uint32 bitstring, uint32 length);
- // feed a bitstring to the crc calculation (0 < length <= 32)
- uint16 checksum (void){
- // return the calculated checksum and erase it for next calls to add_bits()
- register uint16 sum = crc;
- crc = 0xFFFF;
- return sum;
- }
- };
- #endif