Skip to content

Conversation

@yfakariya
Copy link
Member

Add byte array based packer/unpacker and efficient (but not precise) subtree unpacker.

This PR also includes some bug fixes found in testing.

* Introduce byte array based unpacker.
* Refactor with bridge pattern to support ByteArrayUnpacker as well as improve code sharing for maintenancibility, runtime working set size, and dll size.
* Experimentally introduce "Fast" unpacker which does not bookkeep collection state.
* Improve ext type unpacking efficiency.
* Stream position and sentinel check always fail for non-stream based Unpacker.
* Fast unpacker does not check subtree state, so these tests should be skipped.
This commit introduce byte array based packer for performance by avoiding
Stream operation.
This commit also includes:
* Factory methods for byte array packers.
* Internal buffer managers to support various use cases for byte array packers.
* Encoder extension method for efficient encoding.
* Refactoring to reuse msgpack packing logic amang flavors.
This commit also enable unsafe option for future use.
This commit ensures at least 4 bytes remains in the buffer for utf8 encoding.
This commit unifies and inlines packer impls to MessagePackXxxPacker.
This commit inlines over structured unpacker hierarchy to reduce virtcall and
code size.

This commit also improves offset management for "stripped" Stream.
…ows InvalidMessageStreamException for EoF.

The methods' contracts do not state throwing InvalidMessageStreamException in the first place.
Latest Unity does not allow System.Web and System.Windows.Forms assembly
reference, so this commit excludes them from net3.5 build.
For platforms which do not support TraceSource, the tracing code is nop.
@yfakariya yfakariya merged commit efda405 into master Aug 13, 2017
@yfakariya yfakariya deleted the wip/improve-packer-unpacker branch August 13, 2017 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants