Skip to content

Modern implementation of (some) MessageStudio file formats in managed C#

License

Notifications You must be signed in to change notification settings

EPD-Libraries/MessageStudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Message Studio C#

License Downloads

Modern implementation of (some) EPD MessageStudio file formats written in managed C#

Current Support

  • MSBT (Message Studio Binary Text)

MSBT Usage

From Binary

byte[] data = File.ReadAllBytes("path/to/file.msbt");
Msbt msbt = Msbt.FromBinary(data);

From Yaml

string yaml = File.ReadAllText("path/to/file.msbt.yml");
Msbt msbt = Msbt.FromYaml(yaml);

Write Binary (to Stream)

/* ... */

using MemoryStream ms = new();
msbt.WriteBinary(
    ms,
    endianness: Endian.Little,
    encoding: Encoding.Unicode // Encoding.UTF8 is not supported!
);

To Binary (to Bytes)

Note: This method creates a copy of the written bytes.
Use WriteBinary(in Stream, TextEncoding?, Endianness?) if writing to a stream is possible.

/* ... */

byte[] data = msbt.ToBinary(
    endianness: Endian.Little,
    encoding: Encoding.Unicode // Encoding.UTF8 is not supported!
);

To Yaml

/* ... */

string yaml = msbt.ToYaml();

About

Modern implementation of (some) MessageStudio file formats in managed C#

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages