Take a byte out of it! Your task is to, given an unsigned integer n, find the largest number which can be created by removing a single byte (8 consecutive bits) of data.



Example

Given the number 7831, we first convert it to binary (removing any leading zeroes):

1111010010111


We then find the consecutive group of 8 bits which, when removed, will yield the largest new result. In this case, there are 3 solutions, shown below

1111010010111
  ^      ^       
   ^      ^
    ^      ^


Removing this any of these yields 11111, which we then convert back to its decimal value 31 for the answer.



Test Cases

256        -&gt;   1
999        -&gt;   3
7831       -&gt;   31
131585     -&gt;   515
7854621    -&gt;   31261
4294967295 -&gt;   16777215 (if your language can handle 32 bit integers)




Rules


It is guaranteed that the bit length of n will be larger than 8. 
Your solution should theoretically work for any bit length of n larger than 8, but in practice, needs only work for integers 255 &lt; n &lt; 216
Input/Output should be in decimal.
You may submit a full program or a function.
This is code-golf, so the shortest program (in bytes) wins!
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