When a .dd.md5 file is provided, the process would decompress the image once to write to disk, and again to get the total byte count of the .dd source. Instead, implement a FIFO and some clever redirects to pipe decompressed data to disk and to wc to get byte count at the same time. If a .dd.md5 file is present, this byte count is used.
One less decompress has a time savings of about 30% though this is heavily dependent on CPU, disk speed, compression algorithm, etc.
When a .dd.md5 file is provided, the process would decompress the image once to write to disk, and again to get the total byte count of the .dd source. Instead, implement a FIFO and some clever redirects to pipe decompressed data to disk and to
wc
to get byte count at the same time. If a .dd.md5 file is present, this byte count is used.One less decompress has a time savings of about 30% though this is heavily dependent on CPU, disk speed, compression algorithm, etc.