You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, you are right. There's no technical need to read the entire Buffer into a string. It's done this way because originally this library was only used on the web (before browsers implemented Blobs) and the conversion from Buffer to String was just a quick and dirty port to node.
does it have to read the whole buffer?
https://github.com/aadsm/jschardet/blob/master/src/init.js#L72-L85
if it has to read the whole buffer, can it return a string as a result?
i want to check if file that i've opened is an
utf-8
file and then return it further, but I don't want to convert whole buffer to string twiceThe text was updated successfully, but these errors were encountered: