Scripty icon indicating copy to clipboard operation
Scripty copied to clipboard

Ability to write raw bytes to files

Open aarondandy opened this issue 8 years ago • 2 comments

I recently tried using scripty to create compressed files that can be embedded into an assembly. Right now I am just using File.WriteAllBytes but would like to know if scripty currently has or if it could in the future have the ability to write bytes instead of just text.

aarondandy avatar Sep 25 '16 07:09 aarondandy

@aarondandy Would you like to write only bytes, or have a mixed mode as well (writing text, then bytes, then text)?

Herdo avatar Oct 05 '16 19:10 Herdo

For my specific needs I only need binary in some files and only need UTF-8 text in others. I am sure that there are people out there that may want mixed though or even other encodings for text. I have not gotten around to reading the code yet but the documentation mentions that it is a wrapper around TextWriter. I wonder if changing that to being a wrapper around StreamWriter would be another way to handle this situation and handle cases where others may need output to be mixed or those that may even need more control over encodings.

aarondandy avatar Oct 05 '16 19:10 aarondandy