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

zero byte compressed file should be handled more gracefully #60

Closed
jtmoon79 opened this issue Oct 13, 2022 · 2 comments
Closed

zero byte compressed file should be handled more gracefully #60

jtmoon79 opened this issue Oct 13, 2022 · 2 comments

Comments

@jtmoon79
Copy link
Owner

Currently, a zero byte compressed file, e.g. log.xz will print to stderr

ERROR: FileXz: reader.read_exact() (stream header magic bytes) path "/var/log/apt/eipp.log.xz" failed to fill whole buffer

Improvement

For zero-byte files, do not attempt to analyze them. Return sooner during processing. This will also skip the error message.

@jtmoon79
Copy link
Owner Author

However, the Improvment is contrary to Tukaani xz behavior.

$ touch zero.xz
$ xz -kdc zero.xz
xz: zero.xz: File format not recognized

@jtmoon79
Copy link
Owner Author

Related issue is that empty files should not have a large Summary section. Just need a one line.

jtmoon79 added a commit that referenced this issue May 8, 2023
Refactor channel data passing to have a consistent set of stages
refelected in new enum `ChanDatum`. All processing threads must
at least pass a `ChanDatum::FileInfo` with a
`FileProcessingResultBlockZero`.

All `FileProcessingResultBlockZero` printing are handled by
the main printing thread instead of file processing threads.

Pass a file Last Modified time (mtime) from file processing threads
to main processing threads.

Change all datas, `Sysline`, `Evtx`, `Utmpx`, `Journal` to have a
`dt()` that returns `DateTimeL`. Previously the `Sysline.dt()` returned
`DateTimeLOpt` which caused a fair amount of tedious code.
Just assume a `Sysline` has a valid `DateTimeL`.

Add necessary tests for `mtime()`.

Issue #104
Issue #60
jtmoon79 added a commit that referenced this issue May 8, 2023
Refactor channel data passing to have a consistent set of stages
refelected in new enum `ChanDatum`. All processing threads must
at least pass a `ChanDatum::FileInfo` with a
`FileProcessingResultBlockZero`.

All `FileProcessingResultBlockZero` printing are handled by
the main printing thread instead of file processing threads.

Pass a file Last Modified time (mtime) from file processing threads
to main processing threads.

Change all datas, `Sysline`, `Evtx`, `Utmpx`, `Journal` to have a
`dt()` that returns `DateTimeL`. Previously the `Sysline.dt()` returned
`DateTimeLOpt` which caused a fair amount of tedious code.
Just assume a `Sysline` has a valid `DateTimeL`.

Add necessary tests for `mtime()`.

Issue #104
Issue #60
jtmoon79 added a commit that referenced this issue May 8, 2023
Refactor channel data passing to have a consistent set of stages
refelected in new enum `ChanDatum`. All processing threads must
at least pass a `ChanDatum::FileInfo` with a
`FileProcessingResultBlockZero`.

All `FileProcessingResultBlockZero` printing are handled by
the main printing thread instead of file processing threads.

Pass a file Last Modified time (mtime) from file processing threads
to main processing threads.

Change all datas, `Sysline`, `Evtx`, `Utmpx`, `Journal` to have a
`dt()` that returns `DateTimeL`. Previously the `Sysline.dt()` returned
`DateTimeLOpt` which caused a fair amount of tedious code.
Just assume a `Sysline` has a valid `DateTimeL`.

Add necessary tests for `mtime()`.

Issue #104
Issue #60
@jtmoon79 jtmoon79 closed this as completed May 8, 2023
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