hmsort

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 7 Imported by: 0

README

hmsort

Fast external sort function

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(record Record, less Less, outWriter io.Writer, tempFileName string, partBufferSize int) (err error)

record - function for get next record of data. Should return []byte or nil if no more data

less - function for compare two records of data. Should return true if b1 < b2

outWriter - io.Writer for save sorted data

tempFileName - name of temp file. File will be overwritten if it already exists

partBufferSize - presort buffer size

Types

type Less

type Less func(b1, b2 []byte) bool

Function for compare two records of data. Should return true if b1 < b2

type Record

type Record func() []byte

Function for get next record of data. Should return []byte or nil if no more data

Jump to

Keyboard shortcuts

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