Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pocolog --extract, --compress, --to-new-format have been missing functionality since removal of file.rb in 2019 #42

Open
pierrewillenbrockdfki opened this issue Jun 18, 2024 · 0 comments

Comments

@pierrewillenbrockdfki
Copy link

pierrewillenbrockdfki commented Jun 18, 2024

The each_block implementation was removed with file.rb, which is used by --extract, --compress, --to-new-format. The alternative seems to be each_block_header, and then continuing reading the stream either by reading the whole rest of the payload, or using some more specific readers.

For --to-new-format, this is not possible, considering the old file will not have a prologue and the Logfiles.initialize will fail without creating a Logfiles object used by each_block_header. Here, one can fall back to BlockStream and its read_next_block_header.

An implementation of this can be found in https://github.com/pierrewillenbrockdfki/tools-pocolog/pull/new/cli-each_block-fixes

You can use that as a basis for your own fixes, or i can create a merge request if this is fine as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant