Update readme

This commit is contained in:
Dmitry Shirokov 2017-10-16 11:46:01 +11:00
parent 802964244f
commit 17f788b73f
1 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,15 @@ chardet.detectFile('/path/to/file', function(err, encoding) {});
chardet.detectFileSync('/path/to/file');
```
## Working with large data sets
Sometimes, when data set is huge and you want to optimize performace (in tradeoff of less accuracy),
you can sample only first N bytes of the buffer:
```javascript
chardet.detectFile('/path/to/file', { sampleSize: 32 }, function(err, encoding) {});
```
## Supported Encodings:
* UTF-8