bedops icon indicating copy to clipboard operation
bedops copied to clipboard

Status tracker at head of Starch archive-in-progress

Open alexpreynolds opened this issue 7 years ago • 1 comments

Examine reserving 256 or 512-byte block after the magic bytes to store a progress string that:

  1. Gets replaced every m elements by n chromosomes with a status string.
  2. Can be accessed with a small custom tool.

alexpreynolds avatar Mar 16 '17 20:03 alexpreynolds

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.

alexpreynolds avatar Mar 20 '17 22:03 alexpreynolds