Representation of compact stars using the black string set–up