Skip to content

Commit

Permalink
feat: rename namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Oct 2, 2023
1 parent cc15ea1 commit 68713dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>6pack</AssemblyName>
<RootNamespace>DotFastLZ.Packaging.Tools.Cli</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/DotFastLZ.Packaging.Tools/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
using DotFastLZ.Compression;
using DotFastLZ.Packaging;

namespace DotFastLZ.Packaging.Tools.Cli;
namespace DotFastLZ.Packaging.Tools;

public static class Program
{
Expand Down
13 changes: 10 additions & 3 deletions src/DotFastLZ.Packaging/SixPack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public static class SixPack
public const int SIXPACK_VERSION_MAJOR = 0;
public const int SIXPACK_VERSION_MINOR = 1;
public const int SIXPACK_VERSION_REVISION = 0;

public const string SIXPACK_VERSION_STRING = "0.1.0";

//public const string SIXPACK_VERSION_STRING = "snapshot 20070615";
public const string FASTLZ_EXTENSION = ".fastlz";

Expand Down Expand Up @@ -252,7 +254,10 @@ private static int PackFileCompressed(string input_file, int method, int level,
}

/* too small, don't bother to compress */
if (bytes_read < 32) compress_method = 0;
if (bytes_read < 32)
{
compress_method = 0;
}

/* write to output */
switch (compress_method)
Expand Down Expand Up @@ -493,6 +498,7 @@ out var chunk_extra
{
/* stored, simply copy to output */
case 0:
{
/* read one block at at time, write and update checksum */
total_extracted += chunk_size;
remaining = chunk_size;
Expand All @@ -517,11 +523,12 @@ out var chunk_extra
Console.WriteLine("\nError: checksum mismatch. Aborted.");
Console.WriteLine($"Got {checksum:X8} Expecting {chunk_checksum:X8}");
}

}
break;

/* compressed using FastLZ */
case 1:
{
/* enlarge input buffer if necessary */
if (chunk_size > compressed_bufsize)
{
Expand Down Expand Up @@ -560,7 +567,7 @@ out var chunk_extra
ofs.Write(decompressed_buffer, 0, (int)chunk_extra);
}
}

}
break;

default:
Expand Down

0 comments on commit 68713dd

Please sign in to comment.