Skip to content

Allow encodings for binary readers #1

@StephenCleary

Description

@StephenCleary
    /// <summary>
    /// Creates the binary reader with UTF32 encoding.
    /// </summary>
    /// <param name="segment">The segment.</param>
    /// <returns></returns>
    public static BinaryReader CreateBinaryReaderUtf32(this ArraySegment<byte> segment)
    {
        Contract.Ensures(Contract.Result<BinaryReader>() != null);
        return new BinaryReader(segment.CreateStream(false), Encoding.UTF32);
    }   

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions