mmap

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(file_path string, chunk_size ...int) ([]byte, error)

ReadFile reads in large files using memory-mapped I/O. It reads the file in chunks and returns the entire file as a byte slice.

Parameters:

  • file_path: string
  • chunk_size: int (optional)

Returns:

  • []byte
  • error

Types

type Chunk

type Chunk struct {
	Index int
	Data  []byte
}

Jump to

Keyboard shortcuts

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