Comments (7)
Ah sorry noticed your comment now. It's possible using _start
, there are some reasons these are internal and i'm a bit reluctant to document and expose them more:
- You can do
_start
etc on all decode value types (number, string, array) but it becomes ambiguous what "start" means for a struct (object), is it a field "start" or the start bit range? - Should
start
,stop
etc be returned bykeys
? at the moment all_*
fields are hidden from those functions as otherwise some parts of "standard" jq will act strange, ex you probably don't want..
/recurse
to see them.
So the current "safe" solution is that you have to use a function. But i'm open to change this if we can come up with something that don't mess too much with how one would expect jq to behave. Some new syntax could be interesting, ideally compatible with jq, but would require maintain larger change to gojq etc.
from fq.
Hi, i think you can already do it if i don't misunderstand what you want to do:
$ fq '.frames[1] | tobytes, tobytesrange, tobits, tobitsrange | {start,stop,size}' doc/file.mp3
{
"size": 208,
"start": 0,
"stop": 208
}
{
"size": 208,
"start": 2937,
"stop": 3145
}
{
"size": 1664,
"start": 0,
"stop": 1664
}
{
"size": 1664,
"start": 23496,
"stop": 25160
}
So binaries has start/stop/size properties but you have to use *range
function or slice to get one that is "offsetted". Just tobytes
will have a zero start value.
Hope that helps and let me know if it make sense :)
from fq.
Maybe the discussion in #639 is interesting also
from fq.
Yeah, I left a comment there recently. The question is why use an extra step? Why not just .frames[1].start
?
from fq.
Close for now? maybe revisit in the future if some fancier syntax for "special" properties are introduces?
from fq.
Yes, closing. Underscore-prefixed items are great, somehow missed them. I guess they will stay unless something else is introduced.
from fq.
@ksa-real 👍 yeap think they will stay for now
from fq.
Related Issues (20)
- [Feature request] Support cwf, swf, zwf HOT 1
- [Feature request] Support pdf HOT 1
- [Feature] Support for Doom WAD Files HOT 5
- [feature] add decimal floating-point number support HOT 2
- mp3 file with id3 2.4.0 got killed from console output HOT 6
- typo HOT 3
- [Documentation] Any interest in creating a man page? HOT 5
- Support for non-canonical tags with html HOT 5
- Color output is unreadable on terminals using light backgrounds. HOT 4
- make use of kaitai struct for additional formats? HOT 4
- [Feature request] Support image/bmp HOT 1
- Format Decoder Conventions HOT 3
- zip: last_modification_date and last_modification_time are mislabeled or swapped HOT 2
- gzip files can contain multiple concatenated gzips HOT 8
- Investigate Data Format Description Language (DFDL) HOT 4
- Consider relicensing internal/mathex/float80.go HOT 3
- Enhancing Stream Processing Capabilities for Real-Time Binary Data Analysis HOT 1
- Winget support HOT 1
- readline upgrade HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fq.