def _read_dictionary_page(file_obj, schema_helper, page_header, column_metadata):
 raw_bytes = _read_page(file_obj, page_header, column_metadata)
 io_obj = io.BytesIO(raw_bytes)
 values = encoding.read_plain(io_obj, column_metadata.type, page_header.dictionary_page_header.num_values)
 schema_element = schema_helper.schema_element(column_metadata.path_in_schema[(-1)])
 return (convert_column(values, schema_element) if (schema_element.converted_type is not None) else values)

def _read_dictionary_page ( file_obj , schema_helper , page_header , column_metadata ) : raw_bytes = _read_page ( file_obj , page_header , column_metadata ) io_obj = io . BytesIO ( raw_bytes ) values = encoding . read_plain ( io_obj , column_metadata . type , page_header . dictionary_page_header . num_values ) schema_element = schema_helper . schema_element ( column_metadata . path_in_schema [ ( - 1 ) ] ) return ( convert_column ( values , schema_element ) if ( schema_element . converted_type is not None ) else values )
read a page containing dictionary data .