rvz

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

README

GitHub release Build Status Coverage Status Go Report Card GoDoc Go version Go version

Dolphin RVZ disc images

The github.com/bodgit/rvz package reads the RVZ disc image format used by the Dolphin emulator.

  • Handles all supported compression methods; Zstandard is only marginally slower to read than no compression. Bzip2, LZMA, and LZMA2 are noticeably slower.

How to read a disc image:

package main

import (
	"io"
	"os"

	"github.com/bodgit/rvz"
)

func main() {
	f, err := os.Open("image.rvz")
	if err != nil {
		panic(err)
	}
	defer f.Close()

	r, err := rvz.NewReader(f)
	if err != nil {
		panic(err)
	}

	w, err := os.Create("image.iso")
	if err != nil {
		panic(err)
	}
	defer w.Close()

	if _, err = io.Copy(w, r); err != nil {
		panic(err)
	}
}

rvz

The rvz utility currently allows you to decompress an .rvz file back to its original .iso format.

A quick demo:

Documentation

Index

Constants

View Source
const (
	// Extension is the conventional file extension used.
	Extension = ".rvz"
)

Variables

This section is empty.

Functions

func RegisterDecompressor

func RegisterDecompressor(method uint32, dcomp Decompressor)

RegisterDecompressor allows custom decompressors for the specified method.

Types

type Decompressor

type Decompressor func([]byte, io.Reader) (io.ReadCloser, error)

Decompressor describes the function signature that decompression methods must implement to return a new instance of themselves. They are passed any property bytes and an io.Reader providing the stream of bytes.

type Reader added in v1.0.2

type Reader interface {
	io.Reader
	Size() int64
}

A Reader has Read and Size methods.

func NewReader

func NewReader(ra io.ReaderAt) (Reader, error)

NewReader returns a new io.Reader that reads and decompresses from ra.

Directories

Path Synopsis
cmd
rvz
internal

Jump to

Keyboard shortcuts

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