Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jfoshee/unpluggedibmbits
C# Library for reading legacy IBM formatted bits like EBCDIC, big endian and floating point
https://github.com/jfoshee/unpluggedibmbits
Last synced: about 2 months ago
JSON representation
C# Library for reading legacy IBM formatted bits like EBCDIC, big endian and floating point
- Host: GitHub
- URL: https://github.com/jfoshee/unpluggedibmbits
- Owner: jfoshee
- License: other
- Created: 2011-12-22T17:20:51.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T14:35:10.000Z (4 months ago)
- Last Synced: 2024-10-12T19:50:49.276Z (3 months ago)
- Language: C#
- Homepage: https://nuget.org/packages/Unplugged.IbmBits
- Size: 993 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Legacy IBM Data Reading Library in C# #
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](./license.txt)
[![NuGet](https://img.shields.io/nuget/dt/Unplugged.IbmBits.svg)](https://www.nuget.org/packages/Unplugged.IbmBits/)
[![Build status](https://ci.appveyor.com/api/projects/status/e2x9pjs8t1tk3mhp?svg=true)](https://ci.appveyor.com/project/jfoshee/unpluggedibmbits)Helps read/write and convert between legacy IBM System formats and .NET types.
Includes IbmConverter class as well as BinaryReader & BinaryWriter extensions
for EBCDIC string, Big Endian Int16, Big Endian Int32 and
IBM System/360 single precision floating point format.Issues welcome. Do not fold, spindle, or mutilate.
### Example of using BinaryReader extension methods
```C#
using System.IO;
using Unplugged.IbmBits;
``````C#
using (var stream = File.OpenRead("punchcard.bin"))
using (var reader = new BinaryReader(stream))
{
string text = reader.ReadStringEbcdic(12);
float f = reader.ReadSingleIbm();
int i16 = reader.ReadInt16BigEndian();
int i32 = reader.ReadInt32BigEndian();
}
```### Example of using BinaryWriter extension methods
```C#
using (var stream = File.OpenWrite("punchcard.bin"))
using (var writer = new BinaryWriter(stream))
{
writer.WriteEbcdic("Hello, World");
writer.WriteIbmSingle(3.14f);
writer.WriteBigEndian((Int16) 13);
writer.WriteBigEndian((Int32) 54321);
}
```