/bigfile

Use BigFile to treat partitioned files as one

Primary LanguageGoMIT LicenseMIT

BigFile

Use BigFile to treat partitioned files as one.

Documentation

For full documentation see pkg.go.dev.

Example

package main

import (
	"fmt"

	"github.com/twharmon/bigfile"
)

func main() {
	f := bigfile.Open("foo.txt", 10) // max file size of 10 bytes
	content := []byte("foo bar baz")
	f.Write(content) // notice two files were created
	b := make([]byte, len(content))
	f.Read(b)
	fmt.Println(string(b)) // read "foo bar baz" from two files
}

Contribute

Make a pull request.