SlideShare a Scribd company logo
Submit Search
Upload
Binary Reading in C#
Report
Share
Yoshifumi Kawai
CTO at Cysharp
Follow
•
4 likes
•
28,285 views
1
of
15
Binary Reading in C#
•
4 likes
•
28,285 views
Report
Share
Download Now
Download to read offline
Technology
from MessagePack for C# https://github.com/neuecc/MessagePack-CSharp/
Read more
Yoshifumi Kawai
CTO at Cysharp
Follow
Recommended
Xz file-format-1.0.4 by
Xz file-format-1.0.4
Ben Pope
249 views
•
18 slides
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践 by
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
Yoshifumi Kawai
253.5K views
•
53 slides
HttpClient詳解、或いは非同期の落とし穴について by
HttpClient詳解、或いは非同期の落とし穴について
Yoshifumi Kawai
90.5K views
•
37 slides
【Unite 2017 Tokyo】「黒騎士と白の魔王」にみるC#で統一したサーバー/クライアント開発と現実的なUniRx使いこなし術 by
【Unite 2017 Tokyo】「黒騎士と白の魔王」にみるC#で統一したサーバー/クライアント開発と現実的なUniRx使いこなし術
Unity Technologies Japan K.K.
186K views
•
89 slides
RuntimeUnitTestToolkit for Unity by
RuntimeUnitTestToolkit for Unity
Yoshifumi Kawai
70.2K views
•
17 slides
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法 by
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
Yoshifumi Kawai
54.1K views
•
27 slides
More Related Content
Viewers also liked
LINQ in Unity by
LINQ in Unity
Yoshifumi Kawai
50.6K views
•
39 slides
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC by
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC
Yoshifumi Kawai
48.7K views
•
31 slides
UniRx - Reactive Extensions for Unity by
UniRx - Reactive Extensions for Unity
Yoshifumi Kawai
68.7K views
•
31 slides
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの... by
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの...
Yoshifumi Kawai
56.5K views
•
68 slides
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例 by
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例
Yoshifumi Kawai
125.1K views
•
42 slides
Unity に於けるモバイルプラットフォーム向けビルド自動化のおはなし by
Unity に於けるモバイルプラットフォーム向けビルド自動化のおはなし
Mori Tetsuya
6.6K views
•
40 slides
Viewers also liked
(20)
LINQ in Unity by Yoshifumi Kawai
LINQ in Unity
Yoshifumi Kawai
•
50.6K views
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC by Yoshifumi Kawai
ZeroFormatter/MagicOnion - Fastest C# Serializer/gRPC based C# RPC
Yoshifumi Kawai
•
48.7K views
UniRx - Reactive Extensions for Unity by Yoshifumi Kawai
UniRx - Reactive Extensions for Unity
Yoshifumi Kawai
•
68.7K views
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの... by Yoshifumi Kawai
What, Why, How Create OSS Libraries - 過去に制作した30のライブラリから見るC#コーディングテクニックと個人OSSの...
Yoshifumi Kawai
•
56.5K views
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例 by Yoshifumi Kawai
Metaprogramming Universe in C# - 実例に見るILからRoslynまでの活用例
Yoshifumi Kawai
•
125.1K views
Unity に於けるモバイルプラットフォーム向けビルド自動化のおはなし by Mori Tetsuya
Unity に於けるモバイルプラットフォーム向けビルド自動化のおはなし
Mori Tetsuya
•
6.6K views
Unityでlinqを使おう by Yuuki Takada
Unityでlinqを使おう
Yuuki Takada
•
3.2K views
良くわかるMeta by daichi horio
良くわかるMeta
daichi horio
•
34.4K views
Gtmf2011 2011.06.07 slideshare by Hiroki Omae
Gtmf2011 2011.06.07 slideshare
Hiroki Omae
•
8.3K views
Unityと.NET by AimingStudy
Unityと.NET
AimingStudy
•
18.1K views
【Unite 2017 Tokyo】ScriptableObjectを使ってプログラマーもアーティストも幸せになろう by Unity Technologies Japan K.K.
【Unite 2017 Tokyo】ScriptableObjectを使ってプログラマーもアーティストも幸せになろう
Unity Technologies Japan K.K.
•
29.7K views
4 Colors Othello’s Algorithm @仙台 IT 文化祭 2017 by Takaaki Suzuki
4 Colors Othello’s Algorithm @仙台 IT 文化祭 2017
Takaaki Suzuki
•
3.8K views
How to Make Own Framework built on OWIN by Yoshifumi Kawai
How to Make Own Framework built on OWIN
Yoshifumi Kawai
•
38.1K views
【Unite 2017 Tokyo】VRで探り,活用する,人の知覚の仕組み by Unite2017Tokyo
【Unite 2017 Tokyo】VRで探り,活用する,人の知覚の仕組み
Unite2017Tokyo
•
10.7K views
.NET の今と未来 ~ デバイス&クラウド ネイティブを目指して by Akira Inoue
.NET の今と未来 ~ デバイス&クラウド ネイティブを目指して
Akira Inoue
•
2.6K views
【Unite 2017 Tokyo】もっと気軽に、動的なコンテンツ配信を ~アセットバンドルの未来と開発ロードマップ by Unite2017Tokyo
【Unite 2017 Tokyo】もっと気軽に、動的なコンテンツ配信を ~アセットバンドルの未来と開発ロードマップ
Unite2017Tokyo
•
6.4K views
async/await不要論 by bleis tift
async/await不要論
bleis tift
•
29K views
【Unite 2017 Tokyo】セルシェーダーを使用した3Dキャラアプリの開発事例 by Unity Technologies Japan K.K.
【Unite 2017 Tokyo】セルシェーダーを使用した3Dキャラアプリの開発事例
Unity Technologies Japan K.K.
•
25K views
LINQPad with LINQ to BigQuery - Desktop Client for BigQuery by Yoshifumi Kawai
LINQPad with LINQ to BigQuery - Desktop Client for BigQuery
Yoshifumi Kawai
•
5.2K views
How to make the Fastest C# Serializer, In the case of ZeroFormatter by Yoshifumi Kawai
How to make the Fastest C# Serializer, In the case of ZeroFormatter
Yoshifumi Kawai
•
8K views
Similar to Binary Reading in C#
Ac2 by
Ac2
Muhammad Islahuddin
128 views
•
13 slides
C++ Code as Seen by a Hypercritical Reviewer by
C++ Code as Seen by a Hypercritical Reviewer
Andrey Karpov
143 views
•
148 slides
Java binary subtraction by
Java binary subtraction
Charm Sasi
525 views
•
2 slides
A scrupulous code review - 15 bugs in C++ code by
A scrupulous code review - 15 bugs in C++ code
PVS-Studio LLC
73 views
•
133 slides
The Art of Clean Code by
The Art of Clean Code
Yael Zaritsky Perez
104 views
•
78 slides
Some examples of the 64-bit code errors by
Some examples of the 64-bit code errors
PVS-Studio
311 views
•
22 slides
Similar to Binary Reading in C#
(20)
Ac2 by Muhammad Islahuddin
Ac2
Muhammad Islahuddin
•
128 views
C++ Code as Seen by a Hypercritical Reviewer by Andrey Karpov
C++ Code as Seen by a Hypercritical Reviewer
Andrey Karpov
•
143 views
Java binary subtraction by Charm Sasi
Java binary subtraction
Charm Sasi
•
525 views
A scrupulous code review - 15 bugs in C++ code by PVS-Studio LLC
A scrupulous code review - 15 bugs in C++ code
PVS-Studio LLC
•
73 views
The Art of Clean Code by Yael Zaritsky Perez
The Art of Clean Code
Yael Zaritsky Perez
•
104 views
Some examples of the 64-bit code errors by PVS-Studio
Some examples of the 64-bit code errors
PVS-Studio
•
311 views
Getting started cpp full by Võ Hòa
Getting started cpp full
Võ Hòa
•
491 views
Lo Mejor Del Pdc2008 El Futrode C# by Juan Pablo
Lo Mejor Del Pdc2008 El Futrode C#
Juan Pablo
•
412 views
The one that was previously posted on here does not compile or functio.pdf by astarmobiles
The one that was previously posted on here does not compile or functio.pdf
astarmobiles
•
2 views
HCE tutorial by Chien-Ming Chou
HCE tutorial
Chien-Ming Chou
•
7.4K views
Hadoop Puzzlers by DataWorks Summit
Hadoop Puzzlers
DataWorks Summit
•
1.1K views
Hadoop Puzzlers by Cloudera, Inc.
Hadoop Puzzlers
Cloudera, Inc.
•
2.4K views
These are the things I have to do to the code please help me out- Chan.pdf by DylanTZEAverys
These are the things I have to do to the code please help me out- Chan.pdf
DylanTZEAverys
•
3 views
Deep dumpster diving 2010 by RonnBlack
Deep dumpster diving 2010
RonnBlack
•
423 views
Intel JIT Talk by iamdvander
Intel JIT Talk
iamdvander
•
1.6K views
Python Programming: Lists, Modules, Exceptions by Sreedhar Chowdam
Python Programming: Lists, Modules, Exceptions
Sreedhar Chowdam
•
716 views
COSCUP2023 RSA256 Verilator.pdf by Yodalee
COSCUP2023 RSA256 Verilator.pdf
Yodalee
•
228 views
Python 내장 함수 by 용 최
Python 내장 함수
용 최
•
2.4K views
1- (25 pts) Implement the insert method for binary search trees- Do no.pdf by AdrianEBJKingr
1- (25 pts) Implement the insert method for binary search trees- Do no.pdf
AdrianEBJKingr
•
3 views
Java Simple Programs by Upender Upr
Java Simple Programs
Upender Upr
•
6.2K views
More from Yoshifumi Kawai
A quick tour of the Cysharp OSS by
A quick tour of the Cysharp OSS
Yoshifumi Kawai
60.3K views
•
20 slides
A Brief History of UniRx/UniTask, IUniTaskSource in Depth by
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
Yoshifumi Kawai
1.9K views
•
19 slides
Building the Game Server both API and Realtime via c# by
Building the Game Server both API and Realtime via c#
Yoshifumi Kawai
53.8K views
•
67 slides
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能 by
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
Yoshifumi Kawai
42.8K views
•
44 slides
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現 by
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
Yoshifumi Kawai
4.8K views
•
52 slides
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー by
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
Yoshifumi Kawai
42.9K views
•
37 slides
More from Yoshifumi Kawai
(20)
A quick tour of the Cysharp OSS by Yoshifumi Kawai
A quick tour of the Cysharp OSS
Yoshifumi Kawai
•
60.3K views
A Brief History of UniRx/UniTask, IUniTaskSource in Depth by Yoshifumi Kawai
A Brief History of UniRx/UniTask, IUniTaskSource in Depth
Yoshifumi Kawai
•
1.9K views
Building the Game Server both API and Realtime via c# by Yoshifumi Kawai
Building the Game Server both API and Realtime via c#
Yoshifumi Kawai
•
53.8K views
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能 by Yoshifumi Kawai
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
Yoshifumi Kawai
•
42.8K views
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現 by Yoshifumi Kawai
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
Yoshifumi Kawai
•
4.8K views
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー by Yoshifumi Kawai
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
Yoshifumi Kawai
•
42.9K views
Implements OpenTelemetry Collector in DotNet by Yoshifumi Kawai
Implements OpenTelemetry Collector in DotNet
Yoshifumi Kawai
•
42.6K views
Deep Dive async/await in Unity with UniTask(EN) by Yoshifumi Kawai
Deep Dive async/await in Unity with UniTask(EN)
Yoshifumi Kawai
•
36.4K views
The Usage and Patterns of MagicOnion by Yoshifumi Kawai
The Usage and Patterns of MagicOnion
Yoshifumi Kawai
•
46.9K views
True Cloud Native Batch Workflow for .NET with MicroBatchFramework by Yoshifumi Kawai
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
Yoshifumi Kawai
•
33.1K views
Memory Management of C# with Unity Native Collections by Yoshifumi Kawai
Memory Management of C# with Unity Native Collections
Yoshifumi Kawai
•
64.6K views
Deep Dive async/await in Unity with UniTask(UniRx.Async) by Yoshifumi Kawai
Deep Dive async/await in Unity with UniTask(UniRx.Async)
Yoshifumi Kawai
•
105.6K views
CEDEC 2018 最速のC#の書き方 - C#大統一理論へ向けて性能的課題を払拭する by Yoshifumi Kawai
CEDEC 2018 最速のC#の書き方 - C#大統一理論へ向けて性能的課題を払拭する
Yoshifumi Kawai
•
74.7K views
RuntimeUnitTestToolkit for Unity(English) by Yoshifumi Kawai
RuntimeUnitTestToolkit for Unity(English)
Yoshifumi Kawai
•
17.5K views
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ... by Yoshifumi Kawai
Photon Server Deep Dive - View from Implmentation of PhotonWire, Multiplayer ...
Yoshifumi Kawai
•
4.6K views
Photon Server Deep Dive - PhotonWireの実装から見つめるPhotonServerの基礎と応用 by Yoshifumi Kawai
Photon Server Deep Dive - PhotonWireの実装から見つめるPhotonServerの基礎と応用
Yoshifumi Kawai
•
52K views
Clash of Oni Online - VR Multiplay Sword Action by Yoshifumi Kawai
Clash of Oni Online - VR Multiplay Sword Action
Yoshifumi Kawai
•
37.6K views
History & Practices for UniRx(EN) by Yoshifumi Kawai
History & Practices for UniRx(EN)
Yoshifumi Kawai
•
4K views
History & Practices for UniRx UniRxの歴史、或いは開発(中)タイトルの用例と落とし穴の回避法 by Yoshifumi Kawai
History & Practices for UniRx UniRxの歴史、或いは開発(中)タイトルの用例と落とし穴の回避法
Yoshifumi Kawai
•
68K views
Introduction to NotifyPropertyChangedGenerator by Yoshifumi Kawai
Introduction to NotifyPropertyChangedGenerator
Yoshifumi Kawai
•
90.2K views
Recently uploaded
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin
70 views
•
64 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About Postman
Postman
25 views
•
43 slides
Microchip: CXL Use Cases and Enabling Ecosystem by
Microchip: CXL Use Cases and Enabling Ecosystem
CXL Forum
129 views
•
12 slides
Throughput by
Throughput
Moisés Armani Ramírez
32 views
•
11 slides
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ... by
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation
25 views
•
9 slides
AMD: 4th Generation EPYC CXL Demo by
AMD: 4th Generation EPYC CXL Demo
CXL Forum
126 views
•
6 slides
Recently uploaded
(20)
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin
•
70 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About Postman
Postman
•
25 views
Microchip: CXL Use Cases and Enabling Ecosystem by CXL Forum
Microchip: CXL Use Cases and Enabling Ecosystem
CXL Forum
•
129 views
Throughput by Moisés Armani Ramírez
Throughput
Moisés Armani Ramírez
•
32 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ... by Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation
•
25 views
AMD: 4th Generation EPYC CXL Demo by CXL Forum
AMD: 4th Generation EPYC CXL Demo
CXL Forum
•
126 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi
•
113 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS
•
23 views
Data-centric AI and the convergence of data and model engineering:opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...
Paolo Missier
•
29 views
Java Platform Approach 1.0 - Picnic Meetup by Rick Ossendrijver
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver
•
25 views
Understanding GenAI/LLM and What is Google Offering - Felix Goh by NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS
•
39 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang
•
35 views
"How we switched to Kanban and how it integrates with product planning", Vady... by Fwdays
"How we switched to Kanban and how it integrates with product planning", Vady...
Fwdays
•
61 views
The Importance of Cybersecurity for Digital Transformation by NUS-ISS
The Importance of Cybersecurity for Digital Transformation
NUS-ISS
•
25 views
Webinar : Competing for tomorrow’s leaders – How MENA insurers can win the wa... by The Digital Insurer
Webinar : Competing for tomorrow’s leaders – How MENA insurers can win the wa...
The Digital Insurer
•
28 views
The Research Portal of Catalonia: Growing more (information) & more (services) by CSUC - Consorci de Serveis Universitaris de Catalunya
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya
•
66 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs1
•
68 views
"Fast Start to Building on AWS", Igor Ivaniuk by Fwdays
"Fast Start to Building on AWS", Igor Ivaniuk
Fwdays
•
36 views
TE Connectivity: Card Edge Interconnects by CXL Forum
TE Connectivity: Card Edge Interconnects
CXL Forum
•
96 views
MemVerge: Memory Viewer Software by CXL Forum
MemVerge: Memory Viewer Software
CXL Forum
•
118 views
Binary Reading in C#
2.
https://github.com/neuecc/Messag ePack-CSharp/
3.
Int32 Read(byte[] bytes,
int offset) { return (bytes[offset + 0] << 24) | (bytes[offset + 1] << 16) | (bytes[offset + 2] << 8) | (bytes[offset + 3]); } Int32 Read(byte[] bytes, int offset) { return (bytes[offset + 0]) | (bytes[offset + 1] << 8) | (bytes[offset + 2] << 16) | (bytes[offset + 3] << 24); } unsafe int ReadInt32(byte[] bytes, int offset) { fixed (byte* ptr = bytes) { return *(int*)(ptr + offset); } }
4.
[StructLayout(LayoutKind.Explicit)] internal struct Float32Bits { [FieldOffset(0)] public
float Value; [FieldOffset(0)] public Byte Byte0; [FieldOffset(1)] public Byte Byte1; [FieldOffset(2)] public Byte Byte2; [FieldOffset(3)] public Byte Byte3; }
5.
https://github.com/msgpack/msgpack/blob/master/spec.md
6.
public MessagepackType ReadMessagePackType(byte[]
bytes, int offset) { var code = bytes[offset]; if (0 <= code && code <= MessagePackRange.MaxFixPositiveInt) { return FixInt; } if (MessagePackRange.MinFixNegativeInt <= code) { return NegativeInt; } switch (code) { case Int8: return Int8; case Int16: return Int16; case Int32: return Int32; // 以下略 }
7.
static readonly MessagePackType[]
typeLookupTable = new MessagePackType[256]; static MessagePackCode() { for (int i = MinFixInt; i <= MaxFixInt; i++) { typeLookupTable[i] = MessagePackType.Integer; } for (int i = MinFixMap; i <= MaxFixMap; i++) { typeLookupTable[i] = MessagePackType.Map; } typeLookupTable[Nil] = MessagePackType.Nil; typeLookupTable[False] = MessagePackType.Boolean; typeLookupTable[True] = MessagePackType.Boolean; typeLookupTable[Bin8] = MessagePackType.Binary; typeLookupTable[Bin16] = MessagePackType.Binary; // 以下略.... }
8.
static readonly IMapHeaderDecoder[]
mapHeaderDecoders = new IMapHeaderDecoder[MaxSize]; static readonly IArrayHeaderDecoder[] arrayHeaderDecoders = new IArrayHeaderDecoder[MaxSize]; static readonly IBooleanDecoder[] booleanDecoders = new IBooleanDecoder[MaxSize]; static readonly IByteDecoder[] byteDecoders = new IByteDecoder[MaxSize]; static readonly IBytesDecoder[] bytesDecoders = new IBytesDecoder[MaxSize]; static readonly ISByteDecoder[] sbyteDecoders = new ISByteDecoder[MaxSize]; static readonly ISingleDecoder[] singleDecoders = new ISingleDecoder[MaxSize]; static readonly IDoubleDecoder[] doubleDecoders = new IDoubleDecoder[MaxSize]; static readonly IInt16Decoder[] int16Decoders = new IInt16Decoder[MaxSize]; static readonly IInt32Decoder[] int32Decoders = new IInt32Decoder[MaxSize]; static readonly IInt64Decoder[] int64Decoders = new IInt64Decoder[MaxSize]; static readonly IUInt16Decoder[] uint16Decoders = new IUInt16Decoder[MaxSize]; static readonly IUInt32Decoder[] uint32Decoders = new IUInt32Decoder[MaxSize]; static readonly IUInt64Decoder[] uint64Decoders = new IUInt64Decoder[MaxSize]; static readonly IStringDecoder[] stringDecoders = new IStringDecoder[MaxSize]; static readonly IExtDecoder[] extDecoders = new IExtDecoder[MaxSize]; static readonly IExtHeaderDecoder[] extHeaderDecoders = new IExtHeaderDecoder[MaxSize]; static readonly IDateTimeDecoder[] dateTimeDecoders = new IDateTimeDecoder[MaxSize]; static readonly IReadNextDecoder[] readNextDecoders = new IReadNextDecoder[MaxSize];
9.
static readonly IMapHeaderDecoder[]
mapHeaderDecoders = new IMapHeaderDecoder[MaxSize]; static readonly IArrayHeaderDecoder[] arrayHeaderDecoders = new IArrayHeaderDecoder[MaxSize]; static readonly IBooleanDecoder[] booleanDecoders = new IBooleanDecoder[MaxSize]; static readonly IByteDecoder[] byteDecoders = new IByteDecoder[MaxSize]; static readonly IBytesDecoder[] bytesDecoders = new IBytesDecoder[MaxSize]; static readonly ISByteDecoder[] sbyteDecoders = new ISByteDecoder[MaxSize]; static readonly ISingleDecoder[] singleDecoders = new ISingleDecoder[MaxSize]; static readonly IDoubleDecoder[] doubleDecoders = new IDoubleDecoder[MaxSize]; static readonly IInt16Decoder[] int16Decoders = new IInt16Decoder[MaxSize]; static readonly IInt32Decoder[] int32Decoders = new IInt32Decoder[MaxSize]; static readonly IInt64Decoder[] int64Decoders = new IInt64Decoder[MaxSize]; static readonly IUInt16Decoder[] uint16Decoders = new IUInt16Decoder[MaxSize]; static readonly IUInt32Decoder[] uint32Decoders = new IUInt32Decoder[MaxSize]; static readonly IUInt64Decoder[] uint64Decoders = new IUInt64Decoder[MaxSize]; static readonly IStringDecoder[] stringDecoders = new IStringDecoder[MaxSize]; static readonly IExtDecoder[] extDecoders = new IExtDecoder[MaxSize]; static readonly IExtHeaderDecoder[] extHeaderDecoders = new IExtHeaderDecoder[MaxSize]; static readonly IDateTimeDecoder[] dateTimeDecoders = new IDateTimeDecoder[MaxSize]; static readonly IReadNextDecoder[] readNextDecoders = new IReadNextDecoder[MaxSize]; internal interface IInt32Decoder { Int32 Read(byte[] bytes, int offset, out int readSize); }
10.
デリゲートは楽 が、Fastestではない
11.
void BlockCopy(Array src,
int srcOffset, Array dst, int dstOffset, int count)
12.
byte[] WriteVector3(Vector3[] collection) { var
bytes = new byte[collection.Length * 12]; foreach (var item in collection) { WriteFloat(bytes, item.x); WriteFloat(bytes, item.y); WriteFloat(bytes, item.z); } return bytes; }
14.
public static unsafe
void SimpleMemoryCopy(void* dest, void* src, int byteCount) { var pDest = (byte*)dest; var pSrc = (byte*)src; for (int i = 0; i < byteCount; i++) { *pDest = *pSrc; pDest++; pSrc++; } }
15.
Vector3[]を一応Unityネイティブの JsonUtilityの50倍高速にコピー可能 MessagePackの仕様内を逸脱しないよ うに、Extension Formatを先頭識別子 に埋め込むことで互換性を保ちつつ 高速化