pradosoft / prado

Prado - Component Framework for PHP
Other
187 stars 70 forks source link

#835 TBitHelper::crc32 for continued running crc32 computation. #961

Closed belisoful closed 1 year ago

belisoful commented 1 year ago

PHPs crc32 only works on a $string. this is a multi-tool. it can crc32 a file path, or part of a file, and will work on streams when given a stream (similar to stream_get_contents($stream, $length, $offset) but [$stream, $length, $offset] is fed as $string).

One of the key features is that an existing $crc32 can be fed to this method and it will continue the CRC32 computation as if the new $string data (any source: string, file, file part, or stream) were appended to the prior data.