diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-03 18:49:23 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-04 18:36:47 +0100 |
| commit | 519709bf10e30a3666af100df4fcca206dcef498 (patch) | |
| tree | 82eed199d4ca20cedeb7c9fa3db0977bb6dabd1b /DvdLib/BigEndianBinaryReader.cs | |
| parent | 6bf34f8e22c6f72bde15cbb4b500fc6c4f3273b3 (diff) | |
Revert "Remove DvdLib (#9068)"
This reverts commit db1913b08fac0749133634efebd1ee7a7876147a.
Diffstat (limited to 'DvdLib/BigEndianBinaryReader.cs')
| -rw-r--r-- | DvdLib/BigEndianBinaryReader.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/DvdLib/BigEndianBinaryReader.cs b/DvdLib/BigEndianBinaryReader.cs new file mode 100644 index 000000000..b3aad85ce --- /dev/null +++ b/DvdLib/BigEndianBinaryReader.cs @@ -0,0 +1,25 @@ +#pragma warning disable CS1591 + +using System.Buffers.Binary; +using System.IO; + +namespace DvdLib +{ + public class BigEndianBinaryReader : BinaryReader + { + public BigEndianBinaryReader(Stream input) + : base(input) + { + } + + public override ushort ReadUInt16() + { + return BinaryPrimitives.ReadUInt16BigEndian(base.ReadBytes(2)); + } + + public override uint ReadUInt32() + { + return BinaryPrimitives.ReadUInt32BigEndian(base.ReadBytes(4)); + } + } +} |
