diff --git a/toh5.py b/toh5.py
index <HASH>..<HASH> 100644
--- a/toh5.py
+++ b/toh5.py
@@ -62,10 +62,10 @@ def convert_chain(
                                  maxshape=(None,),
                                  dtype=np.float64,
                                  chunks=(chunksize,),
-                                 compression='lzf',
+                                 compression='gzip',
                                  shuffle=True)
 
-        dset.attr.create('unit', u)
+        dset.attrs.create('unit', u.encode('utf8'))
 
     with open(txtfile, 'r') as f:
         for chunk in filechunk(f, chunksize):
Change compression option to gzip (the standard). Updated attribute
syntax to h5py <I>.

lzf compression is better than gzip, but is h5py specific, which we
really don't want.