Show / Hide Table of Contents

Class Packager

Responsible for converting recordings into a binary format and compressing them. If you desire further compression be sure to do a proper comparison of file sizes to ensure you're not actually increasing file size in the process. If your domain allows you to utilize the Brotli compression algorithm, I'd reccomend that for even further compression.

Inheritance
System.Object
Packager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: RecordAndPlay.IO
Assembly: RecordAndPlay.dll
Syntax
public static class Packager

Methods

Package(Stream, Recording[])

Converts recordings into their protobuf counterpart and compresses them using the deflate algorithm. The results are written to the stream passed in.

Declaration
public static long Package(Stream outStream, params Recording[] recordings)
Parameters
Type Name Description
System.IO.Stream outStream

The stream to write the results to.

Recording[] recordings

The recordings to convert to a compressed binary format.

Returns
Type Description
System.Int64

When overridden in a derived class, gets the length in bytes of the stream.

Exceptions
Type Condition
System.ArgumentException

Thrown when the recordings presented is null or empty.

SaveRecordingsToFile(String, Recording[])

Utility function that saves the files to the path specified.

Declaration
public static long SaveRecordingsToFile(string path, params Recording[] recordings)
Parameters
Type Name Description
System.String path

Path to store recordings.

Recording[] recordings

The recordings to save to disk.

Returns
Type Description
System.Int64

ToTransport(Recording[])

Convert recording objects into their protobuf counterpart.

Declaration
public static Recording[] ToTransport(params Recording[] recordings)
Parameters
Type Name Description
Recording[] recordings

Recordings to convert.

Returns
Type Description
Recording[]

The recordings in the protobuf format.

Exceptions
Type Condition
System.ArgumentException

Thrown when the recordings presented is null or empty.

Back to top Generated by DocFX