Bump README
This commit is contained in:
parent
d085d275b3
commit
bab1db0a77
14
README.md
14
README.md
|
@ -37,7 +37,7 @@ import chardet from 'chardet';
|
||||||
chardet.analyse(Buffer.from('hello there!'));
|
chardet.analyse(Buffer.from('hello there!'));
|
||||||
```
|
```
|
||||||
|
|
||||||
Returned value is an array of objects sorted by confidence value in decending order
|
Returned value is an array of objects sorted by confidence value in descending order
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
[
|
[
|
||||||
|
@ -48,8 +48,8 @@ Returned value is an array of objects sorted by confidence value in decending or
|
||||||
|
|
||||||
## Working with large data sets
|
## Working with large data sets
|
||||||
|
|
||||||
Sometimes, when data set is huge and you want to optimize performace (with a tradeoff of less accuracy),
|
Sometimes, when data set is huge and you want to optimize performance (with a tradeoff of less accuracy),
|
||||||
you can sample only first N bytes of the buffer:
|
you can sample only the first N bytes of the buffer:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
chardet
|
chardet
|
||||||
|
@ -57,6 +57,14 @@ chardet
|
||||||
.then(encoding => console.log(encoding));
|
.then(encoding => console.log(encoding));
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also specify where to begin reading from in the buffer:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
chardet
|
||||||
|
.detectFile('/path/to/file', { sampleSize: 32, offset: 128 })
|
||||||
|
.then(encoding => console.log(encoding));
|
||||||
|
```
|
||||||
|
|
||||||
## Supported Encodings:
|
## Supported Encodings:
|
||||||
|
|
||||||
- UTF-8
|
- UTF-8
|
||||||
|
|
Loading…
Reference in New Issue