Skip to content

Commit

Permalink
Version 4.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Jan 18, 2022
1 parent 28f308a commit 958ee47
Show file tree
Hide file tree
Showing 3 changed files with 1,162 additions and 1,162 deletions.
2 changes: 1 addition & 1 deletion CBOR.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Version 4.5:
- Add support for deserializing CBOR objects to IReadOnlyList, IReadOnlyCollection, and ReadOnlyDictionary

Note that after version 4.5x, the CBOR library&apos;s repository will stop including special projects for .NET 2.0 and .NET 4.0, leaving the .NET-Standard project for building the library.</releaseNotes><summary></summary><license type='expression'>CC0-1.0</license><projectUrl>https://github.com/peteroupc/CBOR</projectUrl><authors>Peter Occil</authors><description>A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 8949.</description><owners>Peter Occil</owners><title>CBOR (Concise Binary Object Representation)</title><tags>cbor data serialization binary json</tags><dependencies><group targetFramework='.NETStandard1.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.8.2' /></group><group targetFramework='.NETFramework2.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.8.2' /></group><group targetFramework='.NETFramework4.0'><dependency id='PeterO.URIUtility' version='1.0.0' /><dependency id='PeterO.Numbers' version='1.8.2' /></group></dependencies></metadata><files><file src='CBOR/bin/Release/netstandard1.0/CBOR.dll' target='/lib/netstandard1.0' /><file src='CBOR/bin/Release/netstandard1.0/CBOR.xml' target='/lib/netstandard1.0' /><file src='CBOR20/bin/Release/CBOR.dll' target='/lib/net20' /><file src='CBOR20/bin/Release/CBOR.xml' target='/lib/net20' /><file src='CBOR40/bin/Release/CBOR.dll' target='/lib/net40' /><file src='CBOR40/bin/Release/CBOR.xml' target='/lib/net40' /></files></package
>
>
16 changes: 8 additions & 8 deletions CBORTest/CBORGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ private void GenerateSmall(IRandomGenExtended r, int depth, ByteWriter bs) {
GenerateArgument(r, 0, r.GetInt32(100), bs);
} else if (v < 35) {
bs.Write(0x41);
bs.Write(0x20);
bs.Write(0x20);
} else if (v < 45) {
bs.Write(0x41);
bs.Write(0x20);
bs.Write(0x20);
} else if (v < 50) {
bs.Write(0x81);
this.GenerateSmall(r, depth + 1, bs);
this.GenerateSmall(r, depth + 1, bs);
} else if (v < 53) {
bs.Write(0xa2);
bs.Write(0xf7);
bs.Write(0xf6);
this.GenerateSmall(r, depth + 1, bs);
bs.Write(0xf5);
bs.Write(0xf7);
bs.Write(0xf6);
this.GenerateSmall(r, depth + 1, bs);
bs.Write(0xf5);
} else if (v < 80) {
bs.Write(r.GetInt32(0x40));
} else if (v < 100) {
Expand Down Expand Up @@ -291,4 +291,4 @@ public byte[] Generate(IRandomGenExtended random) {
return ret;
}
}
}
}
Loading

0 comments on commit 958ee47

Please sign in to comment.