C# Class Dk.x10c.BinaryImage

This class has methods for reading and writing BIEF format files, as specified by .
Datei anzeigen Open project: kierenj/0x10c-DevKit

Public Methods

Method Description
ReadImage ( Stream s, Compression &compress, string>.Dictionary headers = null ) : ushort[]

Reads a binary image. Note that this method will work on both actual BIEF-formatted files and raw big-endian files.

ReadImage ( string path, Compression &compress, string>.Dictionary headers = null ) : ushort[]

Reads a binary image. Note that this method will work on both actual BIEF-formatted files and raw big-endian files.

ReadRawImage ( Stream s, ByteOrder byteOrder = ByteOrder.BigEndian ) : ushort[]

Reads a raw, unencapsulated binary image, performing byte swapping as necessary.

ReadRawImage ( string path, ByteOrder byteOrder = ByteOrder.BigEndian ) : ushort[]

Reads a raw, unencapsulated binary image, performing byte swapping as necessary.

WriteImage ( Stream s, ushort words, string>.Dictionary headers = null, Compression compression = Compression.Zlib, Encoding encoding = Encoding.Base64, ByteOrder byteOrder = ByteOrder.BigEndian ) : void

Writes data to a binary image.

WriteImage ( string path, ushort words, string>.Dictionary headers = null, Compression compression = Compression.Zlib, Encoding encoding = Encoding.Base64, ByteOrder byteOrder = ByteOrder.BigEndian ) : void

Writes data to a binary image.

WriteRawImage ( Stream s, ushort words, ByteOrder byteOrder = ByteOrder.BigEndian ) : void

Writes a raw, unencapsulated binary image, performing byte swapping as necessary.

WriteRawImage ( string path, ushort words, ByteOrder byteOrder = ByteOrder.BigEndian ) : void

Writes a raw, unencapsulated binary image, performing byte swapping as necessary.

Private Methods

Method Description
BinaryImage ( ) : System
zlibCompress ( byte bytes ) : byte[]
zlibDecompress ( byte cbytes ) : byte[]

Method Details

ReadImage() public static method

Reads a binary image. Note that this method will work on both actual BIEF-formatted files and raw big-endian files.
public static ReadImage ( Stream s, Compression &compress, string>.Dictionary headers = null ) : ushort[]
s Stream Stream to read from. The stream must be seekable.
compress Compression
headers string>.Dictionary If non-null, all headers will be /// added to this dictionary. Header keys will be lower case.
return ushort[]

ReadImage() public static method

Reads a binary image. Note that this method will work on both actual BIEF-formatted files and raw big-endian files.
public static ReadImage ( string path, Compression &compress, string>.Dictionary headers = null ) : ushort[]
path string Path to the binary image file.
compress Compression
headers string>.Dictionary If non-null, all headers will be /// added to this dictionary. Header keys will be lower case.
return ushort[]

ReadRawImage() public static method

Reads a raw, unencapsulated binary image, performing byte swapping as necessary.
public static ReadRawImage ( Stream s, ByteOrder byteOrder = ByteOrder.BigEndian ) : ushort[]
s Stream Stream to read from.
byteOrder ByteOrder Byte order of the file.
return ushort[]

ReadRawImage() public static method

Reads a raw, unencapsulated binary image, performing byte swapping as necessary.
public static ReadRawImage ( string path, ByteOrder byteOrder = ByteOrder.BigEndian ) : ushort[]
path string Path to the file to read from.
byteOrder ByteOrder Byte order of the file.
return ushort[]

WriteImage() public static method

Writes data to a binary image.
public static WriteImage ( Stream s, ushort words, string>.Dictionary headers = null, Compression compression = Compression.Zlib, Encoding encoding = Encoding.Base64, ByteOrder byteOrder = ByteOrder.BigEndian ) : void
s Stream Stream to write to.
words ushort The data to write.
headers string>.Dictionary Additional headers to include in the output.
compression Compression Compression scheme to use.
encoding Encoding Byte encoding scheme to use.
byteOrder ByteOrder On-disk byte ordering.
return void

WriteImage() public static method

Writes data to a binary image.
public static WriteImage ( string path, ushort words, string>.Dictionary headers = null, Compression compression = Compression.Zlib, Encoding encoding = Encoding.Base64, ByteOrder byteOrder = ByteOrder.BigEndian ) : void
path string Path of the file to write to.
words ushort The data to write.
headers string>.Dictionary Additional headers to include in the output.
compression Compression Compression scheme to use.
encoding Encoding Byte encoding scheme to use.
byteOrder ByteOrder On-disk byte ordering.
return void

WriteRawImage() public static method

Writes a raw, unencapsulated binary image, performing byte swapping as necessary.
public static WriteRawImage ( Stream s, ushort words, ByteOrder byteOrder = ByteOrder.BigEndian ) : void
s Stream Stream to write to.
words ushort Data to write.
byteOrder ByteOrder Byte order of the file.
return void

WriteRawImage() public static method

Writes a raw, unencapsulated binary image, performing byte swapping as necessary.
public static WriteRawImage ( string path, ushort words, ByteOrder byteOrder = ByteOrder.BigEndian ) : void
path string Path to the file to write to.
words ushort Data to write.
byteOrder ByteOrder Byte order of the file.
return void