mirror of
https://github.com/wader/fq.git
synced 2024-08-17 16:00:41 +03:00
fq: Use trim from gojq
This commit is contained in:
commit
6059b9ee1b
@ -124,7 +124,7 @@ var markers = scalar.UintMap{
|
||||
RST6: {Sym: "rst6", Description: "Restart with modulo 8 count 6"},
|
||||
RST7: {Sym: "rst7", Description: "Restart with modulo 8 count 7"},
|
||||
SOI: {Sym: "soi", Description: "Start of image"},
|
||||
EOI: {Sym: "eoi", Description: "End of image true"},
|
||||
EOI: {Sym: "eoi", Description: "End of image"},
|
||||
SOS: {Sym: "sos", Description: "Start of scan"},
|
||||
DQT: {Sym: "dqt", Description: "Define quantization table(s)"},
|
||||
DNL: {Sym: "dnl", Description: "Define number of lines"},
|
||||
|
2
format/jpeg/testdata/4x4.fqtest
vendored
2
format/jpeg/testdata/4x4.fqtest
vendored
@ -135,4 +135,4 @@ $ fq -d jpeg dv 4x4.jpg
|
||||
0x90| 3f bf | ?. | [7]: raw bits entropy_coded_data 0x9c-0x9e (2)
|
||||
| | | [8]{}: marker 0x9e-0xa0 (2)
|
||||
0x90| ff | . | prefix: raw bits (valid) 0x9e-0x9f (1)
|
||||
0x90| d9| .| code: "eoi" (217) (End of image true) 0x9f-0xa0 (1)
|
||||
0x90| d9| .| code: "eoi" (217) (End of image) 0x9f-0xa0 (1)
|
||||
|
@ -5,8 +5,6 @@ include "decode";
|
||||
|
||||
def intdiv(a; b): _intdiv(a; b);
|
||||
|
||||
def trim: capture("^\\s*(?<str>.*?)\\s*$"; "m").str;
|
||||
|
||||
# does +1 and [:1] as " "*0 is null
|
||||
def rpad($s; $w): . + ($s * ($w+1-length))[1:];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user