msgpack / msgpack-cli

MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]
http://msgpack.org
Apache License 2.0
834 stars 175 forks source link

Add public Packer PackBinary(byte[] array, int offset, int count) #293

Open HenrikFrystykNielsen opened 6 years ago

HenrikFrystykNielsen commented 6 years ago

First of all, thanks for a great library -- very nice!

My one suggestion is to add an overload on PackBinary that takes these parameters:

Packer PackBinary(byte[] array, int offset, int count)

This is in addition to the ones already there such as:

Packer PackBinary(byte[] value)

This makes it possible to create binary content using MemoryStream etc and not have to copy the array in order for PackBinary to use it. This is for example the case when using gzip'ed content in fluentd.

Thanks again!

Henrik

yfakariya commented 6 years ago

It sounds great idea. Thanks!