From what I remember of what I read, it was done before it was first published because it was considered inappropriate. I'm not sure whether we have the original ending or the edited one. I've just re-read it - makes me wonder what more Orwell could have included to be more offensive!