Example #1
0
        public static ulong PeekUInt64(this IBitBuffer buffer)
        {
            Span <byte> tmp = stackalloc byte[sizeof(ulong)];

            buffer.Peek(tmp);
            return(BinaryPrimitives.ReadUInt64LittleEndian(tmp));
        }
Example #2
0
        /// <summary>
        /// Reads an <see cref="int"/> without advancing the read position.
        /// </summary>
        public static int PeekInt32(this IBitBuffer buffer)
        {
            Span <byte> tmp = stackalloc byte[sizeof(int)];

            buffer.Peek(tmp);
            return(BinaryPrimitives.ReadInt32LittleEndian(tmp));
        }