-
Notifications
You must be signed in to change notification settings - Fork 125
Feature/initial attempt #72
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
f17cb52
initial serilog commit
fbeb47b
intial comments
28a52d6
test comment for reference
360de64
comments made around where to do compression
11f9662
comments on placement of compression
834b1b8
location to do compression o previous file
6a2884f
updates to comments on new method
1027296
file creation and deletion based off previous log
1e27cd8
basic zipping of previous log file at roll
62aca49
added parameters to rolling class, zip type set up in method
814e17f
paramters set up for compression and compression type
b2f32cf
GZIP method set up
67c1153
layout for gzip method set up
d58afda
gzip attempt
99f27a1
GZip basic functionality
9493330
check for uncompressd files and compress
c259969
remove compression bool
636b9f2
new Xunit file, error adding
fddd376
test written for checking compresison, need to delete extra created file
558fb65
log file still in use
64411b7
tests running, disposes log object now
91053dc
moved compression to new file
0be2657
initial commit of work on remote repo
14f3440
moved compression type into src
2d83c64
removed comments from methods
7489f97
moved compression tests into their own file
9a06121
added Assert that original .txt file is deleted in compression, roll
4b5ee31
completed initial PR comments, will resolve the rest on wednesday
a76b65b
updated for comments I did not have questions on / could implement now
4ccea1d
intial method to compress file in chunks for GZip
1325fa3
comments added to gzip method with current functionality
07b897a
updated gzip compress method to use chunking correctly
3b90756
add default value for compression type
5049097
replaced while loop with CopyTo() method
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,13 +132,10 @@ public void GZipCompress(string logFile, string logDirectory) | |
{ | ||
using (var gzipStream = new System.IO.Compression.GZipStream(outputStream, System.IO.Compression.CompressionMode.Compress)) | ||
{ | ||
var buffer = new byte[1024]; | ||
int bytesRead; | ||
int bufferSize = 1024; | ||
var buffer = new byte[bufferSize]; | ||
|
||
while ((bytesRead = inputStream.Read(buffer, 0, buffer.Length)) > 0) | ||
{ | ||
gzipStream.Write(buffer, 0, bytesRead); | ||
} | ||
inputStream.CopyTo(gzipStream, bufferSize); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Such a small buffer size is going to result in sub-par compression ratios - what's the purpose of overriding the default buffer size here? (I guess the default is 64K?) |
||
} | ||
} | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think
buffer
is being used?