xref: /titanic_44/usr/src/common/bzip2/crctable.c (revision ca3e8d88e8c867355e441fbc914c52e7416fc537)
1*ca3e8d88SDave Plauger 
2*ca3e8d88SDave Plauger /*-------------------------------------------------------------*/
3*ca3e8d88SDave Plauger /*--- Table for doing CRCs                                  ---*/
4*ca3e8d88SDave Plauger /*---                                            crctable.c ---*/
5*ca3e8d88SDave Plauger /*-------------------------------------------------------------*/
6*ca3e8d88SDave Plauger 
7*ca3e8d88SDave Plauger /* ------------------------------------------------------------------
8*ca3e8d88SDave Plauger    This file is part of bzip2/libbzip2, a program and library for
9*ca3e8d88SDave Plauger    lossless, block-sorting data compression.
10*ca3e8d88SDave Plauger 
11*ca3e8d88SDave Plauger    bzip2/libbzip2 version 1.0.5 of 10 December 2007
12*ca3e8d88SDave Plauger    Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
13*ca3e8d88SDave Plauger 
14*ca3e8d88SDave Plauger    Please read the WARNING, DISCLAIMER and PATENTS sections in the
15*ca3e8d88SDave Plauger    README file.
16*ca3e8d88SDave Plauger 
17*ca3e8d88SDave Plauger    This program is released under the terms of the license contained
18*ca3e8d88SDave Plauger    in the file LICENSE.
19*ca3e8d88SDave Plauger    ------------------------------------------------------------------ */
20*ca3e8d88SDave Plauger 
21*ca3e8d88SDave Plauger 
22*ca3e8d88SDave Plauger #include "bzlib_private.h"
23*ca3e8d88SDave Plauger 
24*ca3e8d88SDave Plauger /*--
25*ca3e8d88SDave Plauger   I think this is an implementation of the AUTODIN-II,
26*ca3e8d88SDave Plauger   Ethernet & FDDI 32-bit CRC standard.  Vaguely derived
27*ca3e8d88SDave Plauger   from code by Rob Warnock, in Section 51 of the
28*ca3e8d88SDave Plauger   comp.compression FAQ.
29*ca3e8d88SDave Plauger --*/
30*ca3e8d88SDave Plauger 
31*ca3e8d88SDave Plauger UInt32 BZ2_crc32Table[256] = {
32*ca3e8d88SDave Plauger 
33*ca3e8d88SDave Plauger    /*-- Ugly, innit? --*/
34*ca3e8d88SDave Plauger 
35*ca3e8d88SDave Plauger    0x00000000UL, 0x04c11db7UL, 0x09823b6eUL, 0x0d4326d9UL,
36*ca3e8d88SDave Plauger    0x130476dcUL, 0x17c56b6bUL, 0x1a864db2UL, 0x1e475005UL,
37*ca3e8d88SDave Plauger    0x2608edb8UL, 0x22c9f00fUL, 0x2f8ad6d6UL, 0x2b4bcb61UL,
38*ca3e8d88SDave Plauger    0x350c9b64UL, 0x31cd86d3UL, 0x3c8ea00aUL, 0x384fbdbdUL,
39*ca3e8d88SDave Plauger    0x4c11db70UL, 0x48d0c6c7UL, 0x4593e01eUL, 0x4152fda9UL,
40*ca3e8d88SDave Plauger    0x5f15adacUL, 0x5bd4b01bUL, 0x569796c2UL, 0x52568b75UL,
41*ca3e8d88SDave Plauger    0x6a1936c8UL, 0x6ed82b7fUL, 0x639b0da6UL, 0x675a1011UL,
42*ca3e8d88SDave Plauger    0x791d4014UL, 0x7ddc5da3UL, 0x709f7b7aUL, 0x745e66cdUL,
43*ca3e8d88SDave Plauger    0x9823b6e0UL, 0x9ce2ab57UL, 0x91a18d8eUL, 0x95609039UL,
44*ca3e8d88SDave Plauger    0x8b27c03cUL, 0x8fe6dd8bUL, 0x82a5fb52UL, 0x8664e6e5UL,
45*ca3e8d88SDave Plauger    0xbe2b5b58UL, 0xbaea46efUL, 0xb7a96036UL, 0xb3687d81UL,
46*ca3e8d88SDave Plauger    0xad2f2d84UL, 0xa9ee3033UL, 0xa4ad16eaUL, 0xa06c0b5dUL,
47*ca3e8d88SDave Plauger    0xd4326d90UL, 0xd0f37027UL, 0xddb056feUL, 0xd9714b49UL,
48*ca3e8d88SDave Plauger    0xc7361b4cUL, 0xc3f706fbUL, 0xceb42022UL, 0xca753d95UL,
49*ca3e8d88SDave Plauger    0xf23a8028UL, 0xf6fb9d9fUL, 0xfbb8bb46UL, 0xff79a6f1UL,
50*ca3e8d88SDave Plauger    0xe13ef6f4UL, 0xe5ffeb43UL, 0xe8bccd9aUL, 0xec7dd02dUL,
51*ca3e8d88SDave Plauger    0x34867077UL, 0x30476dc0UL, 0x3d044b19UL, 0x39c556aeUL,
52*ca3e8d88SDave Plauger    0x278206abUL, 0x23431b1cUL, 0x2e003dc5UL, 0x2ac12072UL,
53*ca3e8d88SDave Plauger    0x128e9dcfUL, 0x164f8078UL, 0x1b0ca6a1UL, 0x1fcdbb16UL,
54*ca3e8d88SDave Plauger    0x018aeb13UL, 0x054bf6a4UL, 0x0808d07dUL, 0x0cc9cdcaUL,
55*ca3e8d88SDave Plauger    0x7897ab07UL, 0x7c56b6b0UL, 0x71159069UL, 0x75d48ddeUL,
56*ca3e8d88SDave Plauger    0x6b93dddbUL, 0x6f52c06cUL, 0x6211e6b5UL, 0x66d0fb02UL,
57*ca3e8d88SDave Plauger    0x5e9f46bfUL, 0x5a5e5b08UL, 0x571d7dd1UL, 0x53dc6066UL,
58*ca3e8d88SDave Plauger    0x4d9b3063UL, 0x495a2dd4UL, 0x44190b0dUL, 0x40d816baUL,
59*ca3e8d88SDave Plauger    0xaca5c697UL, 0xa864db20UL, 0xa527fdf9UL, 0xa1e6e04eUL,
60*ca3e8d88SDave Plauger    0xbfa1b04bUL, 0xbb60adfcUL, 0xb6238b25UL, 0xb2e29692UL,
61*ca3e8d88SDave Plauger    0x8aad2b2fUL, 0x8e6c3698UL, 0x832f1041UL, 0x87ee0df6UL,
62*ca3e8d88SDave Plauger    0x99a95df3UL, 0x9d684044UL, 0x902b669dUL, 0x94ea7b2aUL,
63*ca3e8d88SDave Plauger    0xe0b41de7UL, 0xe4750050UL, 0xe9362689UL, 0xedf73b3eUL,
64*ca3e8d88SDave Plauger    0xf3b06b3bUL, 0xf771768cUL, 0xfa325055UL, 0xfef34de2UL,
65*ca3e8d88SDave Plauger    0xc6bcf05fUL, 0xc27dede8UL, 0xcf3ecb31UL, 0xcbffd686UL,
66*ca3e8d88SDave Plauger    0xd5b88683UL, 0xd1799b34UL, 0xdc3abdedUL, 0xd8fba05aUL,
67*ca3e8d88SDave Plauger    0x690ce0eeUL, 0x6dcdfd59UL, 0x608edb80UL, 0x644fc637UL,
68*ca3e8d88SDave Plauger    0x7a089632UL, 0x7ec98b85UL, 0x738aad5cUL, 0x774bb0ebUL,
69*ca3e8d88SDave Plauger    0x4f040d56UL, 0x4bc510e1UL, 0x46863638UL, 0x42472b8fUL,
70*ca3e8d88SDave Plauger    0x5c007b8aUL, 0x58c1663dUL, 0x558240e4UL, 0x51435d53UL,
71*ca3e8d88SDave Plauger    0x251d3b9eUL, 0x21dc2629UL, 0x2c9f00f0UL, 0x285e1d47UL,
72*ca3e8d88SDave Plauger    0x36194d42UL, 0x32d850f5UL, 0x3f9b762cUL, 0x3b5a6b9bUL,
73*ca3e8d88SDave Plauger    0x0315d626UL, 0x07d4cb91UL, 0x0a97ed48UL, 0x0e56f0ffUL,
74*ca3e8d88SDave Plauger    0x1011a0faUL, 0x14d0bd4dUL, 0x19939b94UL, 0x1d528623UL,
75*ca3e8d88SDave Plauger    0xf12f560eUL, 0xf5ee4bb9UL, 0xf8ad6d60UL, 0xfc6c70d7UL,
76*ca3e8d88SDave Plauger    0xe22b20d2UL, 0xe6ea3d65UL, 0xeba91bbcUL, 0xef68060bUL,
77*ca3e8d88SDave Plauger    0xd727bbb6UL, 0xd3e6a601UL, 0xdea580d8UL, 0xda649d6fUL,
78*ca3e8d88SDave Plauger    0xc423cd6aUL, 0xc0e2d0ddUL, 0xcda1f604UL, 0xc960ebb3UL,
79*ca3e8d88SDave Plauger    0xbd3e8d7eUL, 0xb9ff90c9UL, 0xb4bcb610UL, 0xb07daba7UL,
80*ca3e8d88SDave Plauger    0xae3afba2UL, 0xaafbe615UL, 0xa7b8c0ccUL, 0xa379dd7bUL,
81*ca3e8d88SDave Plauger    0x9b3660c6UL, 0x9ff77d71UL, 0x92b45ba8UL, 0x9675461fUL,
82*ca3e8d88SDave Plauger    0x8832161aUL, 0x8cf30badUL, 0x81b02d74UL, 0x857130c3UL,
83*ca3e8d88SDave Plauger    0x5d8a9099UL, 0x594b8d2eUL, 0x5408abf7UL, 0x50c9b640UL,
84*ca3e8d88SDave Plauger    0x4e8ee645UL, 0x4a4ffbf2UL, 0x470cdd2bUL, 0x43cdc09cUL,
85*ca3e8d88SDave Plauger    0x7b827d21UL, 0x7f436096UL, 0x7200464fUL, 0x76c15bf8UL,
86*ca3e8d88SDave Plauger    0x68860bfdUL, 0x6c47164aUL, 0x61043093UL, 0x65c52d24UL,
87*ca3e8d88SDave Plauger    0x119b4be9UL, 0x155a565eUL, 0x18197087UL, 0x1cd86d30UL,
88*ca3e8d88SDave Plauger    0x029f3d35UL, 0x065e2082UL, 0x0b1d065bUL, 0x0fdc1becUL,
89*ca3e8d88SDave Plauger    0x3793a651UL, 0x3352bbe6UL, 0x3e119d3fUL, 0x3ad08088UL,
90*ca3e8d88SDave Plauger    0x2497d08dUL, 0x2056cd3aUL, 0x2d15ebe3UL, 0x29d4f654UL,
91*ca3e8d88SDave Plauger    0xc5a92679UL, 0xc1683bceUL, 0xcc2b1d17UL, 0xc8ea00a0UL,
92*ca3e8d88SDave Plauger    0xd6ad50a5UL, 0xd26c4d12UL, 0xdf2f6bcbUL, 0xdbee767cUL,
93*ca3e8d88SDave Plauger    0xe3a1cbc1UL, 0xe760d676UL, 0xea23f0afUL, 0xeee2ed18UL,
94*ca3e8d88SDave Plauger    0xf0a5bd1dUL, 0xf464a0aaUL, 0xf9278673UL, 0xfde69bc4UL,
95*ca3e8d88SDave Plauger    0x89b8fd09UL, 0x8d79e0beUL, 0x803ac667UL, 0x84fbdbd0UL,
96*ca3e8d88SDave Plauger    0x9abc8bd5UL, 0x9e7d9662UL, 0x933eb0bbUL, 0x97ffad0cUL,
97*ca3e8d88SDave Plauger    0xafb010b1UL, 0xab710d06UL, 0xa6322bdfUL, 0xa2f33668UL,
98*ca3e8d88SDave Plauger    0xbcb4666dUL, 0xb8757bdaUL, 0xb5365d03UL, 0xb1f740b4UL
99*ca3e8d88SDave Plauger };
100*ca3e8d88SDave Plauger 
101*ca3e8d88SDave Plauger 
102*ca3e8d88SDave Plauger /*-------------------------------------------------------------*/
103*ca3e8d88SDave Plauger /*--- end                                        crctable.c ---*/
104*ca3e8d88SDave Plauger /*-------------------------------------------------------------*/
105