public override void WriteTo(BinaryWriter writer, object value)
            {
                Array array = (Array)value;

                CompressedUIntReaderWriter.WriteTo(writer, (uint)array.Length);
                foreach (object value2 in array)
                {
                    this.singleValueHandler.WriteTo(writer, value2);
                }
            }
            public override object ReadFrom(BinaryReader reader, string elementName)
            {
                int num = (int)CompressedUIntReaderWriter.ReadFrom(reader, elementName);

                object[] array = new object[num];
                for (int i = 0; i < num; i++)
                {
                    array[i] = this.singleValueHandler.ReadFrom(reader, elementName);
                }
                return(array);
            }
 public override void WriteTo(BinaryWriter writer, object value)
 {
     CompressedUIntReaderWriter.WriteTo(writer, (uint)((int)value));
 }
 public override object ReadFrom(BinaryReader reader, string elementName)
 {
     return((int)CompressedUIntReaderWriter.ReadFrom(reader, elementName));
 }
        protected static byte[] ReadBytes(BinaryReader reader, string elementName)
        {
            int count = (int)CompressedUIntReaderWriter.ReadFrom(reader, elementName + ".count");

            return(reader.ReadBytes(count, elementName));
        }
 protected static void WriteBytes(BinaryWriter writer, byte[] bytes)
 {
     CompressedUIntReaderWriter.WriteTo(writer, (uint)bytes.Length);
     writer.Write(bytes);
 }