Documentation
¶
Index ¶
- Constants
- Variables
- func Div(number byte, parts int) [][2]byte
- func ToJson(mymap map[string]interface{}) string
- func Unite(parts [][2]byte) byte
- type Scanliens
- func (t *Scanliens) Get(index int) []byte
- func (t *Scanliens) GetScanlines() [][]byte
- func (t *Scanliens) HideBytes(data []byte, dataType []byte, bitloss int) error
- func (t *Scanliens) RevealBytes() (data []byte, dataType string, bitloss int, err error)
- func (t *Scanliens) ToChunks(chunkSize uint32) ([]chunk.Chunk, error)
- func (t *Scanliens) ToString() string
- func (t *Scanliens) ToggleFilter(undo bool, lines []int)
- type Slice
Constants ¶
const PRESERVE float32 = 0.9 //0.0075
PRESERVE: At each scaline we can compromise only 70% of its bytes
Variables ¶
var ErrDataTooSmall = errors.New("Scanline is too small to hide anything in it")
ErrDataTooSmall Data is too small to hide anything in it
var SectionsMap = [][]byte{ []byte{1, 1, 1, 1, 1, 1, 1, 1}, []byte{2, 2, 2, 2}, []byte{3, 3, 2}, []byte{4, 4}, []byte{5, 3}, []byte{6, 2}, []byte{7, 1}, []byte{8}, }
SectionsMap ways of dividing a 8 bit number
Functions ¶
func Div ¶
Div Divides a 8 bit number $N into sections, each section contaning at most $M bits
Usage:
b = Div(0b00101010, 3) == [[0b001, 3], [0b010, 3], [0b10, 2]] b[0][0] is the first 3 bits of the number b[0][1] is the length of b[0][0]
**@param** _number byte_ The byte to be divided
**@param** _parts int_ How many parts should it be divided into
**@return** _[][2]byte_ An array containg all parts of the divided number into $N parts
Types ¶
type Scanliens ¶
type Scanliens struct {
// contains filtered or unexported fields
}
Scanliens Represensts the **parsed** union of all IDAT chunks.
When talking about PNG files _the real_ image data lives inside the IDAT chunk, however this data is compressed and scattered in multiple IDAT chunks. This class is the actual representation of those IDAT chunks.
func FromChunks ¶
FromChunks Creates a new Scanlines instance from an array of chunks
func (*Scanliens) GetScanlines ¶
GetScanlines Returns all scanlines
func (*Scanliens) RevealBytes ¶
RevealBytes Tries to reveal some hidden bytes inside this scanline