[Issue 14777] New: 0 is not the initial value for std.zlib.adler32

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 6 14:20:23 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14777

          Issue ID: 14777
           Summary: 0 is not the initial value for std.zlib.adler32
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: michalg89 at gmail.com

0 is not the initial value for std.zlib.adler32 as stated in the documentation
(https://github.com/D-Programming-Language/phobos/blob/master/std/zlib.d#L67).
According to zlib docs the initial value should be computed by calling adler32
with null pointer: https://github.com/madler/zlib/blob/master/zlib.h#L1572.
Quick look at the source of zlib revelas the true initial value: 1
(https://github.com/madler/zlib/blob/master/adler32.c#L88)

--


More information about the Digitalmars-d-bugs mailing list