123456789101112131415161718192021222324252627282930 |
- // See https://aka.ms/new-console-template for more information
- using CompServ;
- using CompServ.ClientLibrary;
- Console.WriteLine("Hello, World!");
- var wClient = new CompServWorkerClient(args[0]);
- Console.WriteLine("Checking alive...");
- var isAlive = await wClient.CheckAliveAsync();
- Console.WriteLine("Alive: " + isAlive);
- if (isAlive)
- {
- var dataToCompress1 = new byte[4096];
- dataToCompress1[0] = (byte)'a';
- dataToCompress1[1] = (byte)'b';
- dataToCompress1[2] = (byte)'c';
- var compressedBytes = await wClient.CompressAsync(new CompressRequestModel { Level = 1, Threads = 1, DataToCompress = dataToCompress1 });
- var decompress = await wClient.DecompressAsync(compressedBytes);
- int bp = 0;
- }
- Console.WriteLine();
- Console.Write("Press ENTER to exit...");
- Console.ReadLine();
|