amake / flutter_charset_detector

Flutter plugin that detects the charset (encoding) of text bytes
https://pub.dev/packages/flutter_charset_detector
19 stars 11 forks source link

would you please provide another API to fast detect encoding only? #8

Closed Hilbert2048 closed 8 months ago

Hilbert2048 commented 8 months ago

For instance, to rapidly identify the encoding of a large file, follow these steps:

1、Read a sample portion of the file's data. 2、Utilize a fast encoding detection API. 3、Return only the encoding result. It's unnecessary to return the data associated with the encoding because the fixed-size sample data buffer might not successfully decode

amake commented 8 months ago

I've just released updates with a new detect method that returns only the detected charset without trying to decode the supplied bytes.

Hilbert2048 commented 8 months ago

I've just released updates with a new detect method that returns only the detected charset without trying to decode the supplied bytes.

I just upgraded to 3.1.0 and tried the newly added detect API, it's very convenient, thank you.