-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support for reading compressed files? #45
Comments
Very interesting and worth checking. Especially for users the are using compressed files daily. The task of unpacking could get very tiresome after some time. |
just summary: It could be at the library level or the extension. Need to think about it a little :) |
@Numpsy do you have an example gz file by any chance? I have added small implementation but don't have nominal archive to test it on. |
This is a trivial clef/gz file that I created with a test app and the Serilog File and File.GZip sinks: (I don't think there should be any difference to a plain .clef file compressed to a .gz using gzip/7-zip etc though) |
Thanks, looks good. |
Hi,
I'm not sure if this idea is in scope for the library, or indeed just for Serilog bit (none-Serilog specific), but:
I recently had a look at some Serilog add-ons that compress the log files at various points (e.g. https://github.com/cocowalla/serilog-sinks-file-gzip, https://github.com/cocowalla/serilog-sinks-file-archive), and it came to mind that it could possibly be useful to be able to read the .gz compressed log files without having to unpack them first?
Doing so could possibly be as simple as wrapping the FileStreams in GzipStreams before reading the contents, though I do have a slight recollection that the .NET 4.7 version of GZipStream would only read the first chunk of the file when given a .gz file that contains multiple pieces (which was fixed in the .NET Core version). I haven't tested it though, this is just a thought at the moment.
Any thoughts?
The text was updated successfully, but these errors were encountered: