Skip to content

Commit

Permalink
更新 .NET 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
lc6464 committed Nov 26, 2023
1 parent bf589ba commit f9fbe00
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions LC6464.Base16384.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -17,7 +17,7 @@
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Authors>LC</Authors>
<Version>2.1.0-Preview.1</Version>
<Version>2.1.0</Version>
<PackageReleaseNotes>添加强制使用长流模式的方法,并修复不可 Seek 的流无法正常编解码的问题。</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Base16384 编解码器的 .NET 实现。
<!-- 一些东西 -->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LC6464.Base16384" Version="2.0.0" />
<PackageReference Include="LC6464.Base16384" Version="2.1.0" />
<!-- PackageReference,建议使用 Visual Studio 或 dotnet cli 等工具添加 -->
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Text.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public static ReadOnlySpan<byte> ConvertFromUtf16BEBytesToUtf16LEBytes(this Read
Span<byte> buffer = new byte[data.Length];
var count = data.Length / 2;
for (var i = 0; i < count; i++) {
buffer[i * 2] = data[i * 2 + 1];
buffer[i * 2 + 1] = data[i * 2];
buffer[i * 2] = data[(i * 2) + 1];
buffer[(i * 2) + 1] = data[i * 2];
}
return buffer;
}
Expand All @@ -52,7 +52,7 @@ public static ReadOnlySpan<char> ConvertFromUtf16BEBytesToString(this ReadOnlySp
var count = data.Length / 2;
Span<char> buffer = new char[count];
for (var i = 0; i < count; i++) {
buffer[i] = (char)(data[i * 2] << 8 | data[i * 2 + 1]);
buffer[i] = (char)((data[i * 2] << 8) | data[(i * 2) + 1]);
}
return buffer;
}
Expand Down

1 comment on commit f9fbe00

@lc6464
Copy link
Owner Author

@lc6464 lc6464 commented on f9fbe00 Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #7.

Please sign in to comment.