htape

package module
v0.0.0-...-86cab1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2019 License: BSD-2-Clause Imports: 4 Imported by: 0

README

htape

Go library for handling Hercules tape images

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSFlags

type AWSFlags uint8

AWSFlags is a bitfield representing flags for a single AWS block

const (
	// AWSRecordEnd indicates the end of a logical record
	AWSRecordEnd AWSFlags = 0x20 << iota
	// AWSTapeMark indicates this block is a tape mark (no data)
	AWSTapeMark
	// AWSRecordStart indicates the start of a logical record
	AWSRecordStart
)

type AWSTapeBlock

type AWSTapeBlock struct {
	// CurrentLength is the length of the current block
	CurrentLength uint16
	// PreviousLength is the length of the previous block
	PreviousLength uint16

	// Flags1 is the field for standard AWS flags (see AWSFlags)
	Flags1 AWSFlags
	// Flags2 is a reserved field for future flags
	Flags2 uint8

	// Data for current block
	Data []byte
}

AWSTapeBlock is a single block of an AWS tape image

func UnmarshalAWSBlock

func UnmarshalAWSBlock(in io.Reader) (*AWSTapeBlock, error)

UnmarshalAWSBlock reads an AWS tape block from a stream

func (*AWSTapeBlock) Marshal

func (b *AWSTapeBlock) Marshal() []byte

Marshal create a binary representation of this block

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL