A codebook can be thought of as a 2D array.
A codeword is one row in that 2D array.
If you are given a codeword you cannot reconstruct a codebook as the codeword only contains the information held within that row.
If you know the size of the codebook is 256, and you have 256 codewords then you just have to place all the codewords in order to "reconstruct" the codebook.
Alternatively, if you know the codebook was sorted by distortion values (very common) then you can calculate the distortion of each row and sort accordingly.
I hope this answer is of help to you as I'm not sure I fully understand your question.