Thinking online... Let's look at how a table may be formed. We have a "1" for N, NE, E, SE, S, SW, W, NW. If we assign a value of 1 for N and 2 for NE we have 1, 2 or 3. So the value for E has to be 4. With E on we can have that alone or with NE or SE. NE has a value of 2 so ENE gives 2+4 = 6. So far so good... N=1, NE=2, E=4. We haven't used 5 so let's try assigning 5 to SE. ESE = 5+4 = 9. Next number is 6. Assigning 6 to S gives 6+5=11 for SSE. Assigning 7 for SW gives SSW=7+6=13. Assigning 8 for W gives 8+7=15 for WSW. 9 for NW gives 9+8=17 for WNW. Now the critical case of NNW. That's 9+1=10, which we haven't had yet so that's fine!
Let's tabulate this.
N = 1
NNE = 3
NE =2
ENE = 6
E = 4
ESE = 9
SE = 5
SSE = 11
S = 6
SSW = 13
SW = 7
ESW = 15
W = 8
WNW
NW = 9
NNW = 10
So the table looks like this.
N
NE
NNE
E
SE
S
SW
W
ESE
NNW
SSE
N/A
SSW
N/A
ESW
N/A
So we have a table of 16 entries rather than 256. Great!