If you need it to be in 1 file, maybe you could try something like this?
    
    
    #[
    testing, put your dirty unprintable string here
    ]#
    
    const s = staticRead("main.nim")[3..49]
    
    echo s
    
    
    Run

Output:
    
    
    testing, put your dirty unprintable string here
    
    
    Run

The compressed code is embedded into the block comment. The program 
`staticRead`'s itself and takes a slice to get only the stuff inside the 
comment. You are then free to decompress it and use it to generate the real 
code at compile time.

Reply via email to