Documentation
¶
Index ¶
- func Deflate(text string) (string, error)
- func Dirs(dataRoot string) ([]string, error)
- func Files(dataRoot string) ([]string, error)
- func Inflate(base64String string) (string, error)
- func MakeDir(path string) error
- func ReadLine(reader *bufio.Reader, lineBuffer []byte) (string, error)
- func ReadLineNormal(rd *bufio.Reader, limitBytes int) (string, bool, error)
- func WriteLines(filename string, lines []string, linesep string, modeStr string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadLine ¶
ReadLine is function to iterate lines on bufio.Reader. lineBuffer should be byte slice to buffer data, it can make as make([]byte, 0, 1024*1024) or more simply []byte. 3rd option number of 'make()' will be effect to read speed, It's depends on average length of each lines, I think. In many cases it's enough to 1024*1024.
usage: var rd = bufio.NewReaderSize(fp, bufferSize)
for { line, err := readLine(rd, make([]byte, 0, 1024*1024)) if err != nil { if err == io.EOF { break } panic(err) } lines = append(lines, line) }
func ReadLineNormal ¶
ReadLineNormal is old function to iterate lines on bufio.Reader. *** this is old function. *** The example value for limitBytes is 1000000.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.