@test
def jpeg(h):
 if (h[6:10] in ('JFIF', 'Exif')):
  return u'jpeg'
 if (h[:2] == '\xff\xd8'):
  q = h[:32].tobytes()
  if (('JFIF' in q) or ('8BIM' in q)):
   return u'jpeg'

@ test def jpeg ( h ) : if ( h [ 6 : 10 ] in ( 'JFIF' , 'Exif' ) ) : return u'jpeg' if ( h [ : 2 ] == '\xff\xd8' ) : q = h [ : 32 ] . tobytes ( ) if ( ( 'JFIF' in q ) or ( '8BIM' in q ) ) : return u'jpeg'
jpeg data in jfif format .