Skip to content

Latest commit

 

History

History

2020.08-base64

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Base64 Encoder

Works the same as the linux base64 -w0 command. The -w0 option means that no newlines are printed (some base64 implementations don't have this option).

$ echo $(echo "IOCCC" | ./prog)
SU9DQ0MK

Compilation

Compile with cc --include stdio.h -Wno-implicit-int prog.c -o prog.

Notes

Included shorter version in "prog.short.c", which uses the fact that the EOF constant is commonly -1. The standard says that it should be a negative integer, not especially -1.

Also included a more-liner version that gives less compiler warnings (except -Wcomma from CLANG -Weverything).