edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! The Ogg page checksum. |
| 2 | //! |
| 3 | //! CRC-32 with the Ethernet polynomial `0x04c11db7`, but — unlike almost every |
| 4 | //! other CRC-32 in use — with no bit reflection, no initial value and no final |
| 5 | //! inversion. Feeding a byte stream through the reflected variant every other |
| 6 | //! format uses is the classic way to produce pages a real player rejects, so |
| 7 | //! this is its own small module with its own table. |
| 8 | |
| 9 | /// Bit-per-bit table for the unreflected polynomial. |
| 10 | const |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | static TABLE: = build_table; |
| 30 | |
| 31 | /// Checksum of `chunks` concatenated — the page header (with its checksum field |
| 32 | /// zeroed) followed by the page body. |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 |