func setSize(id int, size uint64) error {
	return setAttribute(id, "disksize", fmt.Sprint(size))
}
setSize sets the size in bytes for a zram device.
package zram
import (
	"fmt"
	"os"
)
func DeviceExists(id int) bool {
	_, err := os.Stat(fmt.Sprintf("/dev/zram%d", id))
	return err == nil
}
func setAttribute(id int, name string, value string) error {
	file := fmt.Sprintf("/sys/block/zram%d/%s", id, name)
	data := []byte(value)
	return os.WriteFile(file, data, 0644)
}