wicked programmer
helping developers everywhere innovate and learn
  • Home
  • Events
  • Publications
  • Learning
  • About
bitarray-min

General

Introducing BitArray serialization for Newtonsoft.Json and System.Text.Json

Wicked ProgrammerAugust 11, 2021

We are releasing the M5.BitArraySerialization.Json to NuGet. This library allows serialization of the BitArray class in .NET using JSON. Support for custom JSON converters for both Newtonsoft.Json and System.Text.Json.

Serialization using Newtonsoft.Json

Just add the Newtonsoft.Json.BitArrayConverter to your serializer settings.

Serialization using System.Text.Json

Just add the System.Text.Json.BitArrayConverter to your serializer options.

We even have support for automatic compression of the BitArray using Brotli compression when the size of the array is large enough to take advantage of compression. We leverage this capability in our M5.BloomFilter implementation to decrease the size of our bloom filter when transferring it across the network. More on this topic in a future article.

Enjoy using M5.BitArraySerialization.Jsonfor your own needs.

Author(s):
Richard Crane, Founder/CTO

Disclaimer:

M5.BitArraySerialization.Json is licensed under the Apache 2.0 license.

References:

BitArray Class (System.Collections) | Microsoft Docs

M5.BitArraySerialization.Json – NuGet

https://www.nuget.org/packages/M5.BitArraySerialization.Json/

M5.BitArraySerialization.Json – GitHub

https://github.com/MILL5/M5.BloomFilter/tree/main/M5.BitArraySerialization.Json

Related Posts

Count Coding Example-min

General /

Quality Issue #1 – Count vs. Count()

General /

Introducing FastSearch, a very fast string search for objects and lookups

General /

Searching for the “Perfect” Laptop!

‹ Introducing FastSearch, a very fast string search for objects and lookups› Quality Issue #1 – Count vs. Count()







Back to Top

© wicked programmer 2023