r/programmingrequests • u/Galap • Jan 03 '19
[Request] binary file writer
Hi,
I'm looking for a simple program where you would type or paste a string of 1s and 0s as input and it would output that string in binary to a bin file. If anyone could help with this I'd really appreciate it.
1
Upvotes
3
u/NoG5 Jan 05 '19
Gif demo
I am tying to learn a bit of C so I tried to make this in it.
Change _bytes[1024]; and the str[8192]; to allow for bigger sizes, it can be compiled to an exe with Tiny C Compiler like this
c:\somepath\tcc.exe -o bin2file.exe c:\somepath\main.c
2
u/THEAVS Jan 03 '19
https://docs.microsoft.com/en-us/dotnet/api/system.io.binarywriter?view=netframework-4.7.2
2
u/pegasusperplexer Jan 04 '19
Do you still need help with this?