0

I have a readStream and I want to know its content encoding.

One of the way which I know is through detect-character-encoding module. But it requires me to read the chunks(Buffers) from readStream due to which I lose the data, as I require readStream further in the code logic as well.

So is there a way to know the readStream's encoding without leading to data(chunk) losses.

Mayank Patel
  • 346
  • 3
  • 18
  • You've asked that question already here: https://stackoverflow.com/questions/69025247/how-to-read-data-of-a-nodejs-stream-without-it-being-lost If the provided answer does not help you, please add a comment/edit the original question instead of posting the same question again. – eol Sep 03 '21 at 09:25
  • The question posted earlier had the problem of data loss which according to the question was solved. Here I am facing another problem that instead of reading the stream is there a way to know its encoding. – Mayank Patel Sep 04 '21 at 10:38

0 Answers0