2012-06-22 12:12:15 +00:00
|
|
|
// This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
|
|
// license. Its contents can be found at:
|
|
|
|
// http://creativecommons.org/publicdomain/zero/1.0/
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
|
|
|
// input -> gzip -> gowriter -> output.
|
|
|
|
func translate_memcpy_uncomp(input io.Reader, output io.Writer, pkgname, funcname string) {
|
|
|
|
fmt.Fprintf(output, `package %s
|
|
|
|
|
2012-10-12 12:15:18 +00:00
|
|
|
// %s returns raw file data.
|
2012-06-22 12:12:15 +00:00
|
|
|
func %s() []byte {
|
|
|
|
return []byte{`, pkgname, funcname, funcname)
|
|
|
|
|
|
|
|
io.Copy(&ByteWriter{Writer: output}, input)
|
|
|
|
|
|
|
|
fmt.Fprint(output, `
|
|
|
|
}
|
|
|
|
}`)
|
|
|
|
}
|