Skip to content

Commit

Permalink
increase max read buffer from 64KiB to 5MiB
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Jan 21, 2019
1 parent 3b92498 commit 6a2f2ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var availableFunctions = map[string]extractFunction{
"sha256": xioc.ExtractSHA256s,
}

const version = "1.1.6"
const version = "1.1.7"

var versionFlag bool
var onlyFlag string
Expand Down Expand Up @@ -78,6 +78,9 @@ func main() {
}

scanner := bufio.NewScanner(os.Stdin)
buf := make([]byte, 64*1024) // 64KiB initial size
scanner.Buffer(buf, 5*1024*1024) // 5MiB max size

for scanner.Scan() {
text := scanner.Text()
for iocType, f := range functions {
Expand Down

1 comment on commit 6a2f2ba

@assafmo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addresses #7

Please sign in to comment.