Take a byte out of it!
Jelly, 6 bytes
BḄ-8ƤṀ
A monadic link taking a number and returning a number.
Try it online!
How?
Uses a nice quick, Ƥ
, developed by miles...
BḄ-8ƤṀ - Link: number
B - convert to a binary list
Ƥ - for loop over some slices to be determined...
-8 - this is a negative nilad, therefore: use overlapping outfixes of length 8
- (exactly what the specification asks us to inspect)
Ḅ - convert from a binary list to an integer (vectorises)
Ṁ - maximum
J, 12 bytes
[:>./8#.\.#:
Try it online!
#: to binary
8 \. remove consecutive groups of eight
#. convert each result to decimal
>./ maximum
[: do nothing, this lets me avoid parentheses
Python 2, 41 bytes
f=lambda n:n>>8and max(n>>8,2*f(n/2)+n%2)
Try it online!