Add default buffer size

This commit is contained in:
ProfessionalUwU 2023-07-03 23:46:59 +02:00
parent 5348a23f58
commit 59f2e3466c
Signed by: ProfessionalUwU
GPG Key ID: 9F28CB1645C4BFB5
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ public class Program {
try { try {
if (args[1] == "MD5") { if (args[1] == "MD5") {
utils.doTheThing(args[1]);
} }
int bufferSize = int.Parse(args[2]); int bufferSize = int.Parse(args[2]);
utils.doTheThing(args[1], bufferSize); utils.doTheThing(args[1], bufferSize);
@ -69,7 +69,7 @@ public class Program {
static void PrintAvailableOptions() { static void PrintAvailableOptions() {
String[] options = { String[] options = {
"checksum - MD5, Murmur and XxHash", "checksum - MD5, Murmur and XxHash - Default buffer size is 4096",
"compareDatabases", "compareDatabases",
"compareChecksums", "compareChecksums",
"saveToSqlite", "saveToSqlite",

View File

@ -199,7 +199,7 @@ public class ChksumUtils {
return hash; return hash;
} }
public void doTheThing(string hashalgo, int bufferSize) { public void doTheThing(string hashalgo, int bufferSize = 4096) {
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost"); ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
IDatabase db = redis.GetDatabase(); IDatabase db = redis.GetDatabase();