def null_list(pages, size):
 res = []
 for page in pages:
  if (size > 4096):
   size -= 4096
  else:
   page = page[:size]
   for s in page.split('\x00'):
    if (s != ''):
     res.append(s)
 return res

def null_list ( pages , size ) : res = [ ] for page in pages : if ( size > 4096 ) : size -= 4096 else : page = page [ : size ] for s in page . split ( '\x00' ) : if ( s != '' ) : res . append ( s ) return res
split a section on 0-bytes .