Skip to content

Commit

Permalink
support 6pack dotnet tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ikpil committed Mar 2, 2024
1 parent 515f0b5 commit 7fb5b23
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 61 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: dotnet test -c Release --no-build --verbosity normal

- name: publish to local
run: dotnet publish src/DotFastLZ.Packaging.Tools -c Release --framework net8.0 --no-restore --no-self-contained --output working-temp
run: dotnet publish src/6pack -c Release --framework net8.0 --no-restore --no-self-contained --output working-temp

- name: version
id: version
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Zip
run: |
cd working-temp
zip -r ../DotFastLZ.Packaging.Tools-${{ steps.version.outputs.version}}.zip ./
zip -r ../6pack-${{ steps.version.outputs.version}}.zip ./
if: success()

- uses: release-drafter/release-drafter@master
Expand All @@ -60,7 +60,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: |
DotFastLZ.Packaging.Tools-${{ steps.version.outputs.version}}.zip
6pack-${{ steps.version.outputs.version}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
14 changes: 7 additions & 7 deletions DotFastLZ.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Compression", "sr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Packaging", "src\DotFastLZ.Packaging\DotFastLZ.Packaging.csproj", "{95E2DEFC-180E-4EAC-84CD-583DE1AAD587}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Packaging.Tools", "src\DotFastLZ.Packaging.Tools\DotFastLZ.Packaging.Tools.csproj", "{A843203D-30DB-4CA4-9F6D-F03E9F1038C1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{87EE9A81-1074-4466-AF83-6A059185A8E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Compression.Tests", "test\DotFastLZ.Compression.Tests\DotFastLZ.Compression.Tests.csproj", "{FD482722-B4F3-4D05-8AAA-8EA228888C05}"
Expand All @@ -19,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Packaging.Tests",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotFastLZ.Resource", "src\DotFastLZ.Resource\DotFastLZ.Resource.csproj", "{A64E2087-E40B-45C0-9084-F00A213D8FBC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "6pack", "src\6pack\6pack.csproj", "{73921309-6ED4-4099-A434-680FF5AF2D94}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -36,10 +36,6 @@ Global
{FD482722-B4F3-4D05-8AAA-8EA228888C05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD482722-B4F3-4D05-8AAA-8EA228888C05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD482722-B4F3-4D05-8AAA-8EA228888C05}.Release|Any CPU.Build.0 = Release|Any CPU
{A843203D-30DB-4CA4-9F6D-F03E9F1038C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A843203D-30DB-4CA4-9F6D-F03E9F1038C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A843203D-30DB-4CA4-9F6D-F03E9F1038C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A843203D-30DB-4CA4-9F6D-F03E9F1038C1}.Release|Any CPU.Build.0 = Release|Any CPU
{95E2DEFC-180E-4EAC-84CD-583DE1AAD587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95E2DEFC-180E-4EAC-84CD-583DE1AAD587}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95E2DEFC-180E-4EAC-84CD-583DE1AAD587}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -52,13 +48,17 @@ Global
{A64E2087-E40B-45C0-9084-F00A213D8FBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A64E2087-E40B-45C0-9084-F00A213D8FBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A64E2087-E40B-45C0-9084-F00A213D8FBC}.Release|Any CPU.Build.0 = Release|Any CPU
{73921309-6ED4-4099-A434-680FF5AF2D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73921309-6ED4-4099-A434-680FF5AF2D94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73921309-6ED4-4099-A434-680FF5AF2D94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73921309-6ED4-4099-A434-680FF5AF2D94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C20491BC-E472-4F09-B29C-DD7BF853C1C4} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
{FD482722-B4F3-4D05-8AAA-8EA228888C05} = {87EE9A81-1074-4466-AF83-6A059185A8E9}
{A843203D-30DB-4CA4-9F6D-F03E9F1038C1} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
{95E2DEFC-180E-4EAC-84CD-583DE1AAD587} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
{15F8F8E3-2D89-4487-AAFB-3B617470342E} = {87EE9A81-1074-4466-AF83-6A059185A8E9}
{A64E2087-E40B-45C0-9084-F00A213D8FBC} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
{73921309-6ED4-4099-A434-680FF5AF2D94} = {642F4CE7-0431-49D4-9BDE-E663C13C7792}
EndGlobalSection
EndGlobal
41 changes: 19 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
<h1 align="center">DotFastLZ</h1>
<p align="center"><i>
DotFastLZ is C# fastlz, a port of <a href="https://github.com/ariya/FastLZ">ariya/FastLZ</a><br/>
DotFastLZ can be used in Unity3D, C# server, network packet, game data
</i></p>
# DotFastLZ
*DotFastLZ is C# fastlz, a port of [ariya/FastLZ](https://github.com/ariya/FastLZ)*
*DotFastLZ can be used in Unity3D, C# server, network packet, game data*

---
<p align="center">
<img alt="![GitHub License]" src="https://img.shields.io/github/license/ikpil/DotFastLZ?style=for-the-badge">
<img alt="Languages" src="https://img.shields.io/github/languages/top/ikpil/DotFastLZ?style=for-the-badge">
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/ikpil/DotFastLZ?style=for-the-badge">
<a href="https://github.com/ikpil/DotFastLZ"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/ikpil/DotFastLZ?style=for-the-badge&logo=github"></a>
<a href="https://github.com/ikpil/DotFastLZ/actions/workflows/dotnet.yml"><img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/ikpil/DotFastLZ/dotnet.yml?style=for-the-badge&logo=github"></a>
<a href="https://github.com/ikpil/DotFastLZ/actions/workflows/codeql.yml"><img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/ikpil/DotFastLZ/codeql.yml?style=for-the-badge&logo=github&label=CODEQL"></a>
<a href="https://github.com/ikpil/DotFastLZ/commits"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ikpil/DotFastLZ?style=for-the-badge&logo=github"></a>
<a href="https://github.com/ikpil/DotFastLZ/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/ikpil/DotFastLZ?style=for-the-badge&logo=github&color=44cc11"></a>
<a href="https://github.com/ikpil/DotFastLZ/issues"><img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed-raw/ikpil/DotFastLZ?style=for-the-badge&logo=github&color=a371f7"></a>
<a href="https://www.nuget.org/packages/DotFastLZ.Compression"><img alt="NuGet Version" src="https://img.shields.io/nuget/vpre/DotFastLZ.Compression?style=for-the-badge&logo=nuget"></a>
<a href="https://www.nuget.org/packages/DotFastLZ.Compression"><img alt="NuGet Downloads" src="https://img.shields.io/nuget/dt/DotFastLZ.Compression?style=for-the-badge&logo=nuget"></a>
<a href="https://visitorbadge.io/status?path=ikpil%2FDotFastLZ"><img alt="Visitors" src="https://api.visitorbadge.io/api/daily?path=ikpil%2FDotFastLZ&countColor=%23263759"></a>
<a href="https://github.com/sponsors/ikpil"><img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/ikpil?style=for-the-badge&logo=GitHub-Sponsors&link=https%3A%2F%2Fgithub.com%2Fsponsors%2Fikpil"></a>
</p>

![GitHub License](https://img.shields.io/github/license/ikpil/DotFastLZ?style=for-the-badge)
![Languages](https://img.shields.io/github/languages/top/ikpil/DotFastLZ?style=for-the-badge)
![GitHub repo size](https://img.shields.io/github/repo-size/ikpil/DotFastLZ?style=for-the-badge)
[![GitHub Repo stars](https://img.shields.io/github/stars/ikpil/DotFastLZ?style=for-the-badge&logo=github)](https://github.com/ikpil/DotFastLZ)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ikpil/DotFastLZ/dotnet.yml?style=for-the-badge&logo=github)](https://github.com/ikpil/DotFastLZ/actions/workflows/dotnet.yml)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ikpil/DotFastLZ/codeql.yml?style=for-the-badge&logo=github&label=CODEQL)](https://github.com/ikpil/DotFastLZ/actions/workflows/codeql.yml)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ikpil/DotFastLZ?style=for-the-badge&logo=github)](https://github.com/ikpil/DotFastLZ/commits)
[![GitHub issues](https://img.shields.io/github/issues-raw/ikpil/DotFastLZ?style=for-the-badge&logo=github&color=44cc11)](https://github.com/ikpil/DotFastLZ/issues)
[![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/ikpil/DotFastLZ?style=for-the-badge&logo=github&color=a371f7)](https://github.com/ikpil/DotFastLZ/issues)
[![NuGet Version](https://img.shields.io/nuget/vpre/DotFastLZ.Compression?style=for-the-badge&logo=nuget)](https://www.nuget.org/packages/DotFastLZ.Compression)
[![NuGet Downloads](https://img.shields.io/nuget/dt/DotFastLZ.Compression?style=for-the-badge&logo=nuget)](https://www.nuget.org/packages/DotFastLZ.Compression)
[![Visitors](https://api.visitorbadge.io/api/daily?path=ikpil%2FDotFastLZ&countColor=%23263759)](https://visitorbadge.io/status?path=ikpil%2FDotFastLZ)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/ikpil?style=for-the-badge&logo=GitHub-Sponsors&link=https%3A%2F%2Fgithub.com%2Fsponsors%2Fikpil)](https://github.com/sponsors/ikpil)

---

Expand All @@ -46,7 +43,7 @@ for (int level = 1; level <= 2; ++level)
}
```

## Usage: DotFastLZ.Compression.Packaging ##
## Usage: DotFastLZ.Compression.Packaging
```csharp
const string targetFileName = "soruce.txt";
string packagingFileName = targetFileName + ".fastlz";
Expand All @@ -56,7 +53,7 @@ SixPack.PackFile(2, targetFileName, packagingFileName, Console.Write);
SixPack.UnpackFile(packagingFileName, Console.Write);
```

## Usage: DotFastLZ.Packaging.Tools ##
## Usage: 6pack
```shell
$ dotnet tool install --global 6pack
$ dotnet tool 6pack --help
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<AssemblyName>6pack</AssemblyName>
<ToolCommandName>6pack</ToolCommandName>
<PackAsTool>true</PackAsTool>
<PackageId>DotFastLZ.Packaging.Tools</PackageId>
<PackageId>6pack</PackageId>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Authors>ikpil</Authors>
<Description>DotFastLZ - a port of FastLZ, Small and portable byte-aligned LZ77 compression for C#, Unity3D</Description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
/*
6PACK - file compressor using FastLZ (lightning-fast compression library)
Copyright (C) 2007-2020 Ariya Hidayat <[email protected]>
Copyright (C) 2023 Choi Ikpil <[email protected]> https://github.com/ikpil/DotFastLz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

using System;
using System;
using System.IO;
using DotFastLZ.Compression;
using DotFastLZ.Packaging;

namespace DotFastLZ.Packaging.Tools;

public static class Program
{
public static int Main(string[] args)
Expand Down
File renamed without changes.

0 comments on commit 7fb5b23

Please sign in to comment.