public void Setup()
        {
            var message = new MessageWriter(1024);

            message.StartMessage(1);
            message.Write((ushort)3100);
            message.Write((byte)100);
            message.Write((int)int.MaxValue);
            message.WritePacked(int.MaxValue);
            message.EndMessage();

            _data = message.ToByteArray(true);

            MessageReader_Bytes_Pooled.Return(MessageReader_Bytes_Pooled.Get(_data));

            // Services
            var services = new ServiceCollection();

            services.AddSingleton <ObjectPoolProvider>(new DefaultObjectPoolProvider());
            services.AddSingleton(serviceProvider =>
            {
                var provider = serviceProvider.GetRequiredService <ObjectPoolProvider>();
                var policy   = new MessageReader_Bytes_Pooled_ImprovedPolicy(serviceProvider);
                return(provider.Create(policy));
            });

            _pool = services
                    .BuildServiceProvider()
                    .GetRequiredService <ObjectPool <MessageReader_Bytes_Pooled_Improved> >();
        }
        public void Pooled_Bytes_Run_1_000_000()
        {
            for (var i = 0; i < 1_000_000; i++)
            {
                var reader = MessageReader_Bytes_Pooled.Get(_data);
                var inner  = reader.ReadMessage();

                _ = inner.ReadUInt16();
                _ = inner.ReadByte();
                _ = inner.ReadInt32();
                // inner.ReadPackedInt32();

                MessageReader_Bytes_Pooled.Return(inner);
                MessageReader_Bytes_Pooled.Return(reader);
            }
        }