Add CRC32/CRC32C initialization

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      The existing CRC32 and CRC32C in java.util.zip have only the default constructor and reset method to an initial value zero.

      There are applications where non-zero initial values are useful: resuming the running checksum, concatenating inputs to a common header, or getting the initial value from a transmission. In these cases, restarting from a non-zero value is expensive or impossible.

      There are CRC32 initialization APIs provided in zlib and Python.
      https://github.com/madler/zlib/blob/04f42ceca40f73e2978b50e93806c2a18c1281fc/crc32.c#L1072
      https://docs.python.org/3/library/zlib.html#zlib.crc32

            Assignee:
            Yi-Fan Tsai
            Reporter:
            Yi-Fan Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: