Giter Site home page Giter Site logo

lc6464 / lc6464.base16384 Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 90 KB

Base16384 编解码器的 .NET 跨平台实现。

License: GNU General Public License v3.0

C# 100.00%
base16384 binary character chinese-character utf16be cross-platform dotnet dotnet-library base64 utf16

lc6464.base16384's Introduction

LC6464.Base16384

NuGet 包 GitHub 项目

Base16384 编解码器的 .NET 跨平台实现。 参考:fumiama/base16384 使用:lc6464/Base16384.Net

使用方法

Example.csproj:

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<OutputType>Exe</OutputType>
		<TargetFramework>net8.0</TargetFramework>
		<Nullable>enable</Nullable>
		<ImplicitUsings>enable</ImplicitUsings>
		<!-- 一些东西 -->
	</PropertyGroup>
	<ItemGroup>
		<PackageReference Include="LC6464.Base16384" Version="2.1.0" />
		<!-- PackageReference,建议使用 Visual Studio 或 dotnet cli 等工具添加 -->
	</ItemGroup>
	<ItemGroup>
		<Using Include="LC6464.Base16384" />
		<!-- 一些东西 -->
	</ItemGroup>
</Project>

Program.cs:

Console.Write("请输入要编码的字符串:");
var input = Console.ReadLine() ?? "";
var data = Encoding.UTF8.GetBytes(input);

var result = Base16384.EncodeToNewFile(data, new("output.txt"));

lc6464.base16384's People

Contributors

deepsource-autofix[bot] avatar execute233 avatar lc6464 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

execute233

lc6464.base16384's Issues

增加对不支持seeking的流的支持

对于Console.OpenStandardInput()返回的流,它是不支持seeking,而您的EncodeToStream(Stream, stream)/DecodeToStream(Stream, stream)对流的长度进行了判断,传入这种类型的流时,将会发生异常:System.NotSupportedException: Stream does not support seeking.
虽然使用buffer[]能够解决这个问题,但是这将增加使用该方法的项目的代码量,望您能在将来发布的新版本中增加不支持seeking的流的支持。

更新至 .NET 8.0

.NET 8.0 (LTS) 已于2023年11月14日正式发布,建议检查源代码兼容性后及时跟进。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.