bedops
bedops copied to clipboard
Status tracker at head of Starch archive-in-progress
Examine reserving 256 or 512-byte block after the magic bytes to store a progress string that:
- Gets replaced every m elements by n chromosomes with a status string.
- Can be accessed with a small custom tool.
Perhaps this may not work if writing to an output stream. When writing to an output stream via stdout
, the starch
binary wouldn't know in advance where the compressed data are written to. It just writes to stdout
and wipes its hands clean.
This should definitely work, however, if starch
is set up with an --output-file <fn>
option to instead write to a regular file, which can be fseek()
-ed through and fread()
, etc.
Perhaps another way to do this is to keep writing to stdout
, but create a second, temporary status file that is deleted at the end of compression. Updates happen to this file's string the same way, but the status file is a regular file separate from the archive. We write a tool that accesses the bytes in this status file and processes them into human-readable form.