Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: third_party/lzma_sdk/C/XzCrc64.c

Issue 6730044: Upgrading lzma_sdk to version 9.20. Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/lzma_sdk/C/XzCrc64.h ('k') | third_party/lzma_sdk/C/XzDec.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /* XzCrc64.c -- CRC64 calculation
2 2010-04-16 : Igor Pavlov : Public domain */
3
4 #include "XzCrc64.h"
5
6 #define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42)
7 UInt64 g_Crc64Table[256];
8
9 void MY_FAST_CALL Crc64GenerateTable(void)
10 {
11 UInt32 i;
12 for (i = 0; i < 256; i++)
13 {
14 UInt64 r = i;
15 int j;
16 for (j = 0; j < 8; j++)
17 r = (r >> 1) ^ ((UInt64)kCrc64Poly & ~((r & 1) - 1));
18 g_Crc64Table[i] = r;
19 }
20 }
21
22 UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size)
23 {
24 const Byte *p = (const Byte *)data;
25 for (; size > 0 ; size--, p++)
26 v = CRC64_UPDATE_BYTE(v, *p);
27 return v;
28 }
29
30 UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size)
31 {
32 return CRC64_GET_DIGEST(Crc64Update(CRC64_INIT_VAL, data, size));
33 }
OLDNEW
« no previous file with comments | « third_party/lzma_sdk/C/XzCrc64.h ('k') | third_party/lzma_sdk/C/XzDec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698